Mercurial > pidgin
comparison libpurple/protocols/msn/directconn.c @ 30056:f0de96a35877
This should probably work a bit better. At least, we want to get rid of any
listeners when we timeout.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Thu, 06 May 2010 07:36:56 +0000 |
parents | 531fe008410e |
children | a6642358155b |
comparison
equal
deleted
inserted
replaced
30055:71c24c85e4af | 30056:f0de96a35877 |
---|---|
775 * and nobody has connected us in DC_CONNECT_TIMEOUT seconds | 775 * and nobody has connected us in DC_CONNECT_TIMEOUT seconds |
776 */ | 776 */ |
777 static gboolean | 777 static gboolean |
778 msn_dc_incoming_connection_timeout_cb(gpointer data) { | 778 msn_dc_incoming_connection_timeout_cb(gpointer data) { |
779 MsnDirectConn *dc = data; | 779 MsnDirectConn *dc = data; |
780 MsnSlpCall *slpcall = dc->slpcall; | 780 MsnSlpCall *slpcall; |
781 | 781 |
782 if (purple_debug_is_verbose()) | 782 if (purple_debug_is_verbose()) |
783 purple_debug_info("msn", "msn_dc_incoming_connection_timeout_cb %p\n", dc); | 783 purple_debug_info("msn", "msn_dc_incoming_connection_timeout_cb %p\n", dc); |
784 | 784 |
785 g_return_val_if_fail(dc != NULL, FALSE); | 785 g_return_val_if_fail(dc != NULL, FALSE); |
786 | 786 |
787 slpcall = dc->slpcall; | 787 slpcall = dc->slpcall; |
788 g_return_val_if_fail(slpcall != NULL, FALSE); | |
789 | 788 |
790 if (dc->listen_data != NULL) { | 789 if (dc->listen_data != NULL) { |
791 purple_network_listen_cancel(dc->listen_data); | 790 purple_network_listen_cancel(dc->listen_data); |
792 dc->listen_data = NULL; | 791 dc->listen_data = NULL; |
793 } | 792 } |
801 purple_network_remove_port_mapping(dc->listenfd); | 800 purple_network_remove_port_mapping(dc->listenfd); |
802 close(dc->listenfd); | 801 close(dc->listenfd); |
803 dc->listenfd = -1; | 802 dc->listenfd = -1; |
804 } | 803 } |
805 | 804 |
805 dc->connect_timeout_handle = 0; | |
806 msn_dc_destroy(dc); | 806 msn_dc_destroy(dc); |
807 /* Start p2p file transfer */ | 807 |
808 msn_slpcall_session_init(slpcall); | 808 /* Start p2p file transfer, if possible */ |
809 if (slpcall) | |
810 msn_slpcall_session_init(slpcall); | |
809 | 811 |
810 return FALSE; | 812 return FALSE; |
811 } | 813 } |
812 | 814 |
813 /* | 815 /* |