changeset 30476: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 71c24c85e4af
children 7a82bc59b63f
files libpurple/protocols/msn/directconn.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c	Thu May 06 05:24:06 2010 +0000
+++ b/libpurple/protocols/msn/directconn.c	Thu May 06 07:36:56 2010 +0000
@@ -777,7 +777,7 @@
 static gboolean
 msn_dc_incoming_connection_timeout_cb(gpointer data) {
 	MsnDirectConn *dc = data;
-	MsnSlpCall *slpcall = dc->slpcall;
+	MsnSlpCall *slpcall;
 
 	if (purple_debug_is_verbose())
 		purple_debug_info("msn", "msn_dc_incoming_connection_timeout_cb %p\n", dc);
@@ -785,7 +785,6 @@
 	g_return_val_if_fail(dc != NULL, FALSE);
 
 	slpcall = dc->slpcall;
-	g_return_val_if_fail(slpcall != NULL, FALSE);
 
 	if (dc->listen_data != NULL) {
 		purple_network_listen_cancel(dc->listen_data);
@@ -803,9 +802,12 @@
 		dc->listenfd = -1;
 	}
 
+	dc->connect_timeout_handle = 0;
 	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;
 }