changeset 30486:28f774432954

Use msn_dc_fallback_to_p2p where possible.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 17 May 2010 08:42:51 +0000
parents 1efb52ff7ad0
children ccae796bdbad
files libpurple/protocols/msn/directconn.c
diffstat 1 files changed, 4 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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;