/soc/2013/ashmew2/filetransferX: 1c1ee83b75b7: get xfer->local_port

Ashish Gupta ashmew2 at gmail.com
Mon Aug 5 21:56:18 EDT 2013


Changeset: 1c1ee83b75b7b6f83a488ddb80068be09a55d5d2
Author:	 Ashish Gupta <ashmew2 at gmail.com>
Date:	 2013-08-06 07:26 +0530
Branch:	 filetransferX
URL: https://hg.pidgin.im/soc/2013/ashmew2/filetransferX/rev/1c1ee83b75b7

Description:

get xfer->local_port

diffstat:

 libpurple/protocols/jabber/google/google_session.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (25 lines):

diff --git a/libpurple/protocols/jabber/google/google_session.c b/libpurple/protocols/jabber/google/google_session.c
--- a/libpurple/protocols/jabber/google/google_session.c
+++ b/libpurple/protocols/jabber/google/google_session.c
@@ -998,9 +998,9 @@ gtalk_port_cb(int listenfd, gpointer dat
 	if(listenfd == -1)
 		purple_debug_info("google_session", "FATAL ERROR : listenfd is -1 !\n");
 	else
-		xfer->remote_port = purple_network_get_port_from_fd(listenfd);
-
-	purple_debug_info("google_session", "Inside gtalk_port_cb()\n, Reached ENDofFunc.\n");
+		xfer->local_port = purple_network_get_port_from_fd(listenfd);
+	
+	purple_debug_info("google_session", "Inside gtalk_port_cb()\n, Reached ENDofFunc.Port : %d\n",xfer->local_port);
 	
 }
 
@@ -1183,7 +1183,7 @@ gtalk_xfer_init(PurpleXfer *xfer)
 	GoogleAVSessionData *session_data = (GoogleAVSessionData *)(session->session_data);
 	GList *iter;
 	PurpleNetworkListenData *portdata = purple_network_listen_range_family
-		(27015, 64000, AF_INET, SOCK_STREAM, gtalk_port_cb, NULL);
+		(27015, 64000, AF_INET, SOCK_STREAM, gtalk_port_cb, xfer);
 
 	purple_debug_info("google_session", "Inside gtalk_xfer_init() \n");
 	purple_debug_info("google_session", "We have a file now. Details of Xfer :\nwho : %s\nfilename:%s\nlocal_filename:%s\nsize:%d\nlocal_port : %d\nremote_port:%d\nremote_ip:%s\nBytes Sent:%d\nBytes Remaining:%d\n",xfer->who,xfer->filename,xfer->local_filename,xfer->size,xfer->local_port,xfer->remote_port,xfer->remote_ip,xfer->bytes_sent,xfer->bytes_remaining);



More information about the Commits mailing list