# HG changeset patch # User Elliott Sales de Andrade # Date 1274085771 0 # Node ID 28f774432954c345c2962819f2091b0ef32d946f # Parent 1efb52ff7ad0e6782b6692531899c2264bb97495 Use msn_dc_fallback_to_p2p where possible. diff -r 1efb52ff7ad0 -r 28f774432954 libpurple/protocols/msn/directconn.c --- a/libpurple/protocols/msn/directconn.c Mon May 17 08:04:00 2010 +0000 +++ b/libpurple/protocols/msn/directconn.c Mon May 17 08:42:51 2010 +0000 @@ -323,11 +323,11 @@ g_return_if_fail(dc != NULL); slpcall = dc->slpcall; - g_return_if_fail(slpcall != NULL); msn_dc_destroy(dc); - msn_slpcall_session_init(slpcall); + if (slpcall) + msn_slpcall_session_init(slpcall); } static void @@ -805,11 +805,7 @@ } dc->connect_timeout_handle = 0; - msn_dc_destroy(dc); - - /* Start p2p file transfer, if possible */ - if (slpcall) - msn_slpcall_session_init(slpcall); + msn_dc_fallback_to_p2p(dc); return FALSE; } @@ -867,12 +863,7 @@ * Both internal and external connection attempts failed. * Fall back to p2p transfer. */ - MsnSlpCall *slpcall = dc->slpcall; - - msn_dc_destroy(dc); - /* Start p2p file transfer, if possible */ - if (slpcall) - msn_slpcall_session_init(slpcall); + msn_dc_fallback_to_p2p(dc); } return FALSE;