changeset 30101:7f564cf26ea3

I think it's more accurate to say that a DC is a P2P transfer, so if that fails, we're falling back to SB, not P2P.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 26 May 2010 23:20:18 +0000
parents 3c09870e8564
children cb74b2877ea7
files libpurple/protocols/msn/directconn.c libpurple/protocols/msn/directconn.h libpurple/protocols/msn/slp.c
diffstat 3 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c	Wed May 26 23:15:06 2010 +0000
+++ b/libpurple/protocols/msn/directconn.c	Wed May 26 23:20:18 2010 +0000
@@ -314,13 +314,13 @@
 }
 
 void
-msn_dc_fallback_to_p2p(MsnDirectConn *dc)
+msn_dc_fallback_to_sb(MsnDirectConn *dc)
 {
 	MsnSlpLink *slplink;
 	MsnSlpCall *slpcall;
 	GQueue *queue = NULL;
 
-	purple_debug_info("msn", "msn_dc_try_fallback_to_p2p %p\n", dc);
+	purple_debug_info("msn", "msn_dc_fallback_to_sb %p\n", dc);
 
 	g_return_if_fail(dc != NULL);
 
@@ -677,7 +677,7 @@
 		purple_debug_warning("msn", "msn_dc_recv_cb: recv error\n");
 
 		if(dc->state != DC_STATE_ESTABLISHED)
-			msn_dc_fallback_to_p2p(dc);
+			msn_dc_fallback_to_sb(dc);
 		else
 			msn_dc_destroy(dc);
 		return;
@@ -687,7 +687,7 @@
 		purple_debug_info("msn", "msn_dc_recv_cb: recv EOF\n");
 
 		if(dc->state != DC_STATE_ESTABLISHED)
-			msn_dc_fallback_to_p2p(dc);
+			msn_dc_fallback_to_sb(dc);
 		else
 			msn_dc_destroy(dc);
 		return;
@@ -720,8 +720,8 @@
 			return;
 
 		case DC_PROCESS_FALLBACK:
-			purple_debug_warning("msn", "msn_dc_recv_cb: packet processing error, fall back to p2p\n");
-			msn_dc_fallback_to_p2p(dc);
+			purple_debug_warning("msn", "msn_dc_recv_cb: packet processing error, fall back to SB\n");
+			msn_dc_fallback_to_sb(dc);
 			return;
 
 		}
@@ -822,7 +822,7 @@
 	}
 
 	dc->connect_timeout_handle = 0;
-	msn_dc_fallback_to_p2p(dc);
+	msn_dc_fallback_to_sb(dc);
 
 	return FALSE;
 }
@@ -870,7 +870,7 @@
 		} else {
 			/*
 			 * Connection failed
-			 * Fall back to P2P transfer
+			 * Fall back to SB transfer
 			 */
 			msn_dc_outgoing_connection_timeout_cb(dc);
 		}
@@ -878,9 +878,9 @@
 	} else {
 		/*
 		 * Both internal and external connection attempts failed.
-		 * Fall back to p2p transfer.
+		 * Fall back to SB transfer.
 		 */
-		msn_dc_fallback_to_p2p(dc);
+		msn_dc_fallback_to_sb(dc);
 	}
 
 	return FALSE;
--- a/libpurple/protocols/msn/directconn.h	Wed May 26 23:15:06 2010 +0000
+++ b/libpurple/protocols/msn/directconn.h	Wed May 26 23:20:18 2010 +0000
@@ -145,7 +145,7 @@
  * create a listening socket.
  */
 void
-msn_dc_fallback_to_p2p(MsnDirectConn *dc);
+msn_dc_fallback_to_sb(MsnDirectConn *dc);
 
 /*
  * Increases the slpcall counter in DC. The direct connection remains open
--- a/libpurple/protocols/msn/slp.c	Wed May 26 23:15:06 2010 +0000
+++ b/libpurple/protocols/msn/slp.c	Wed May 26 23:20:18 2010 +0000
@@ -360,7 +360,7 @@
 
 			} else {
 				/* We weren't able to create a listener either. Use SB. */
-				msn_dc_fallback_to_p2p(dc);
+				msn_dc_fallback_to_sb(dc);
 			}
 
 		} else {
@@ -939,7 +939,7 @@
 	if (type && !strcmp(type, "application/x-msnmsgr-transreqbody")) {
 		MsnDirectConn *dc = slpcall->slplink->dc;
 		if (dc) {
-			msn_dc_fallback_to_p2p(dc);
+			msn_dc_fallback_to_sb(dc);
 			return;
 		}
 	}