pidgin: 8995bf8c: We can't both remove a timeout and retur...

qulogic at pidgin.im qulogic at pidgin.im
Fri May 21 18:03:51 EDT 2010


-----------------------------------------------------------------
Revision: 8995bf8c14c5b7fb67a84a18ba9bf73e7be3fca8
Ancestor: 299ec0ee11e4503b5d14774fe7ffadd79b3de6b3
Author: qulogic at pidgin.im
Date: 2010-05-08T00:08:01
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8995bf8c14c5b7fb67a84a18ba9bf73e7be3fca8

Modified files:
        libpurple/protocols/msn/directconn.c

ChangeLog: 

We can't both remove a timeout and return FALSE in its callback.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/directconn.c	6f29041f81fa5a8caa642974790f610124d44754
+++ libpurple/protocols/msn/directconn.c	92251e3e7adb502f12a343e5072c05ff5f6b2e3e
@@ -825,10 +825,7 @@ msn_dc_outgoing_connection_timeout_cb(gp
 
 	g_return_val_if_fail(dc != NULL, FALSE);
 
-	if (dc->connect_timeout_handle != 0) {
-		purple_timeout_remove(dc->connect_timeout_handle);
-		dc->connect_timeout_handle = 0;
-	}
+	dc->connect_timeout_handle = 0;
 
 	if (dc->connect_data != NULL) {
 		purple_proxy_connect_cancel(dc->connect_data);
@@ -859,14 +856,15 @@ msn_dc_outgoing_connection_timeout_cb(gp
 
 	} else {
 		/*
-		 * Both internal and external connection attempts are failed.
+		 * Both internal and external connection attempts failed.
 		 * Fall back to p2p transfer.
 		 */
-		MsnSlpCall	*slpcall = dc->slpcall;
+		MsnSlpCall *slpcall = dc->slpcall;
 
 		msn_dc_destroy(dc);
-		/* Start p2p file transfer */
-		msn_slpcall_session_init(slpcall);
+		/* Start p2p file transfer, if possible */
+		if (slpcall)
+			msn_slpcall_session_init(slpcall);
 	}
 
 	return FALSE;


More information about the Commits mailing list