im.pidgin.pidgin: 17da48794a2a5ea1202e4adaf483b21c592ffbad

datallah at pidgin.im datallah at pidgin.im
Thu Nov 15 18:40:33 EST 2007


-----------------------------------------------------------------
Revision: 17da48794a2a5ea1202e4adaf483b21c592ffbad
Ancestor: aacbfc80ec02b4833d882d1ff6052b4e6a40d99b
Author: datallah at pidgin.im
Date: 2007-11-15T23:37:36
Branch: im.pidgin.pidgin

Modified files:
        ChangeLog libpurple/protocols/bonjour/bonjour_ft.c

ChangeLog: 

Fix receiving files from Gajim clients by making the SOCKS5 target hash correct.

-------------- next part --------------
============================================================
--- ChangeLog	b0fa18cf03849dfced82e81c452a33f5bf545ce1
+++ ChangeLog	670df8527660d0bce9e57e421a8dcf07d8324c6b
@@ -8,8 +8,9 @@ version 2.3.0:
 	  catch deprecated functions earlier rather than later.
 	* Thanks to a patch from Intel, the Bonjour prpl now supports file
 	  transfers using XEP-0096 and XEP-0065.  This should enable file
-	  transfers between libpurple clients, but will not work with iChat
-	  or Adium as they use a different file transfer implementation.
+	  transfers between libpurple clients and Gajim clients, but will not
+	  work with iChat or Adium as they use a different file transfer
+	  implementation.
 
 	Pidgin:
 	* If a plugin says it can't be unloaded, we now display an error and
============================================================
--- libpurple/protocols/bonjour/bonjour_ft.c	60d4f2ebab5b3c04bb8db048210896787fe8f8c7
+++ libpurple/protocols/bonjour/bonjour_ft.c	bc6a526b517d70641f27b6172e6cdd590c87e4d6
@@ -33,7 +33,7 @@ static void
 static void
 bonjour_bytestreams_init(PurpleXfer *xfer);
 static void
-bonjour_bytestreams_connect(PurpleXfer *xfer);
+bonjour_bytestreams_connect(PurpleXfer *xfer, PurpleBuddy *pb);
 static void
 bonjour_xfer_init(PurpleXfer *xfer);
 static void
@@ -546,7 +546,7 @@ xep_bytestreams_parse(PurpleConnection *
 							xf->proxy_port = portnum;
 							purple_debug_info("bonjour", "bytestream offer parse"
 									  "jid=%s host=%s port=%d.\n", jid, host, portnum);
-							bonjour_bytestreams_connect(xfer);
+							bonjour_bytestreams_connect(xfer, pb);
 							found = TRUE;
 							break;
 						}
@@ -815,13 +815,17 @@ bonjour_bytestreams_connect_cb(gpointer 
 	xmlnode *q_node, *tmp_node;
 	BonjourData *bd;
 
-	if(data == NULL || source < 0) {
+	if(source < 0) {
+		purple_debug_error("bonjour", "Error connecting via SOCKS5 - %s\n",
+			error_message ? error_message : "(null)");
 		xep_ft_si_reject(xf->data, xf->iq_id, xfer->who, "404", "cancel");
 		/* Cancel the connection */
 		purple_xfer_cancel_local(xfer);
 		return;
 	}
 
+	purple_debug_info("bonjour", "Connected successfully via SOCKS5, starting transfer.\n");
+
 	bd = xf->data;
 
 	purple_proxy_info_destroy(xf->proxy_info);
@@ -841,7 +845,7 @@ static void
 }
 
 static void
-bonjour_bytestreams_connect(PurpleXfer *xfer)
+bonjour_bytestreams_connect(PurpleXfer *xfer, PurpleBuddy *pb)
 {
 	XepXfer *xf = NULL;
 	char dstaddr[41];
@@ -858,7 +862,7 @@ bonjour_bytestreams_connect(PurpleXfer *
 	if(!xf)
 		return;
 
-	p = g_strdup_printf("%s@%s", xf->sid, xfer->who);
+	p = g_strdup_printf("%s%s%s", xf->sid, pb->name, purple_account_get_username(pb->account));
 	purple_cipher_digest_region("sha1", (guchar *)p, strlen(p),
 				    sizeof(hashval), hashval, NULL);
 	g_free(p);


More information about the Commits mailing list