/soc/2013/ashmew2/filetransferX: 59722e619b77: (Crash)File selec...

Ashish Gupta ashmew2 at gmail.com
Mon Aug 5 18:09:00 EDT 2013


Changeset: 59722e619b77832ab9cd96b4ad04134f160389a4
Author:	 Ashish Gupta <ashmew2 at gmail.com>
Date:	 2013-08-06 03:38 +0530
Branch:	 filetransferX
URL: https://hg.pidgin.im/soc/2013/ashmew2/filetransferX/rev/59722e619b77

Description:

(Crash)File selection for sending

diffstat:

 libpurple/protocols/jabber/google/google_session.c |  12 ++++++------
 libpurple/protocols/jabber/google/google_session.h |   3 +++
 2 files changed, 9 insertions(+), 6 deletions(-)

diffs (56 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
@@ -1000,7 +1000,7 @@ gtalk_port_cb(int listenfd, gpointer dat
 	
 }
 
-static void
+void
 gtalk_xfer_start(PurpleXfer *xfer)
 {
 	purple_debug_info("google_session", "Inside gtalk_xfer_start()\n");
@@ -1033,15 +1033,15 @@ PurpleXfer *gtalk_xfer_new(PurpleConnect
 		purple_xfer_set_init_fnc(xfer, gtalk_xfer_init);
 		purple_xfer_set_start_fnc(xfer, gtalk_xfer_start);
 	}
+	
+	return xfer;
 }
 
 void
 gtalk_xfer_send(PurpleConnection *gc, const char *who, const char *file)
 {
   PurpleXfer *xfer;
-  xfer = gtalk_new_xfer(gc, who);
-
-  xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_SEND, who);
+  xfer = gtalk_xfer_new(gc, who);
 
   if(!xfer) {
 	  purple_debug_info("google_session", "Failed to Create an Xfer for Sending a File..");
@@ -1084,11 +1084,11 @@ gtalk_xfer_send(PurpleConnection *gc, co
   /*  xmlnode_set_attrib(file_node, "size", FILE_SIZE); */
 }
 
-static void
+void
 gtalk_xfer_init(PurpleXfer *xfer)
 {
 	GoogleSession *session = (GoogleSession *)(xfer->data);
-	GoogleAVSessionData *session_data = session->session_data;
+	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);
diff --git a/libpurple/protocols/jabber/google/google_session.h b/libpurple/protocols/jabber/google/google_session.h
--- a/libpurple/protocols/jabber/google/google_session.h
+++ b/libpurple/protocols/jabber/google/google_session.h
@@ -54,4 +54,7 @@ void jabber_google_session_parse(JabberS
     JabberIqType type, const char *iq, xmlnode *session);
 
 void gtalk_xfer_send(PurpleConnection *gc, const char *who, const char*file);
+void gtalk_xfer_init(PurpleXfer *xfer);
+void gtalk_xfer_start(PurpleXfer *xfer);
+
 #endif /* PURPLE_JABBER_GOOGLE_SESSION_H_ */



More information about the Commits mailing list