/soc/2013/ashmew2/filetransferX: 8e386e4342e0: Fixed Crash
Ashish Gupta
ashmew2 at gmail.com
Mon Aug 5 21:39:19 EDT 2013
Changeset: 8e386e4342e0b7b743a6bd3534bde50de86e1e72
Author: Ashish Gupta <ashmew2 at gmail.com>
Date: 2013-08-06 07:09 +0530
Branch: filetransferX
URL: https://hg.pidgin.im/soc/2013/ashmew2/filetransferX/rev/8e386e4342e0
Description:
Fixed Crash
diffstat:
libpurple/protocols/jabber/google/google_session.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (43 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
@@ -991,8 +991,10 @@ static void
gtalk_port_cb(int listenfd, gpointer data)
{
PurpleXfer *xfer = data;
- if(!xfer)
+ if(!xfer) {
purple_debug_info("google_session", "gtalk_port_cb XFER IS NULL\n");
+ return;
+ }
if(listenfd == -1)
purple_debug_info("google_session", "FATAL ERROR : listenfd is -1 !\n");
else
@@ -1185,12 +1187,13 @@ gtalk_xfer_init(PurpleXfer *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);
-/**TODO: Should probably send out the XML for initiating session now**/
+
gtalk_xfer_session_initiate(xfer);
/**TODO: IP.PORT etc should all be in the GoogleSession thing? I guess so.*/
-/*TODO: xfer->remote_port set in the gtalk_port_cb() */
-/*TODO: xfer->remote_ip and xfer->local_port need to be set somewhere*/
- for(iter=session_data->share_session->remote_share_candidates;
+/*TODO: xfer->local_port set in the gtalk_port_cb() */
+/*TODO: xfer->remote_ip and xfer->remote_port will be set when we get a list of candidates*/
+
+/* for(iter=session_data->share_session->remote_share_candidates;
iter; iter = iter->next) {
PurpleMediaCandidate *candid = (PurpleMediaCandidate *)(iter->data);
if(purple_media_candidate_get_candidate_type(candid)==PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX) {
@@ -1199,7 +1202,9 @@ gtalk_xfer_init(PurpleXfer *xfer)
break;
}
}
+
gtalk_xfer_start(xfer);
+*/
// purple_xfer_start( xfer, -1, xfer->remote_ip, xfer->remote_port );
}
More information about the Commits
mailing list