# HG changeset patch # User Elliott Sales de Andrade # Date 1273131416 0 # Node ID f0de96a358772ea74ca1079a28852adc1af6f103 # Parent 71c24c85e4aff1f0ab0b38b5b60a9e173bc17508 This should probably work a bit better. At least, we want to get rid of any listeners when we timeout. diff -r 71c24c85e4af -r f0de96a35877 libpurple/protocols/msn/directconn.c --- 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; }