/soc/2013/ashmew2/filetransferY: 95787d72892a: Fix for File Tran...
Ashish Gupta
ashmew2 at gmail.com
Sun Sep 22 15:44:29 EDT 2013
Changeset: 95787d72892a21880ec2eeb9f1a00bec2f68e76e
Author: Ashish Gupta <ashmew2 at gmail.com>
Date: 2013-09-23 01:14 +0530
Branch: filetransferX
URL: https://hg.pidgin.im/soc/2013/ashmew2/filetransferY/rev/95787d72892a
Description:
Fix for File Transfers window crash
diffstat:
libpurple/protocols/jabber/google/google_session.c | 20 ++++++++++++++------
libpurple/protocols/jabber/jabber.h | 2 ++
2 files changed, 16 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
@@ -133,12 +133,15 @@ google_session_destroy(GoogleSession *se
purple_debug_info("google_session", "Trying to kill xfer..BEFORE?\n");
purple_debug_info("gs_", "status of xfer : %d",purple_xfer_get_status(share_session->xfer) == PURPLE_XFER_STATUS_STARTED);
*/
- if (purple_xfer_get_status(share_session->xfer) != PURPLE_XFER_STATUS_DONE)
- {
- purple_debug_info("google_session", "Calling xfer_cancel_local\n");
- purple_xfer_cancel_local(share_session->xfer);
- }
-
+ if(share_session->xfer)
+ if (purple_xfer_get_status(share_session->xfer) != PURPLE_XFER_STATUS_CANCEL_LOCAL &&
+ purple_xfer_get_status(share_session->xfer) != PURPLE_XFER_STATUS_CANCEL_REMOTE &&
+ purple_xfer_get_status(share_session->xfer) != PURPLE_XFER_STATUS_DONE)
+ {
+ purple_debug_info("google_session", "Calling xfer_cancel_local\n");
+ purple_xfer_cancel_local(share_session->xfer);
+ }
+
purple_debug_info("google_session", "Trying to kill xfer..AFTERWARDS?\n");
if(share_session->file_to_send)
@@ -957,6 +960,9 @@ google_session_handle_initiate(JabberStr
share_session->xfer = purple_xfer_new(purple_connection_get_account(js->gc), PURPLE_XFER_RECEIVE,
session->remote_jid);
+
+ js->gtalk_xfer_list = g_list_prepend(js->gtalk_xfer_list, share_session->xfer);
+
if(filename)
purple_xfer_set_filename(share_session->xfer, xmlnode_get_data_unescaped(filename));
@@ -2070,6 +2076,8 @@ gtalk_xfer_send(PurpleConnection *gc, co
xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_SEND,
session->remote_jid);
+ js->gtalk_xfer_list = g_list_prepend(js->gtalk_xfer_list, share_session->xfer);
+
/*Setting up Stuff for XFER_SEND*/
purple_xfer_set_init_fnc(xfer, gtalk_xfer_init);
purple_xfer_set_request_denied_fnc(xfer,
diff --git a/libpurple/protocols/jabber/jabber.h b/libpurple/protocols/jabber/jabber.h
--- a/libpurple/protocols/jabber/jabber.h
+++ b/libpurple/protocols/jabber/jabber.h
@@ -197,6 +197,8 @@ struct _JabberStream
JabberCapabilities server_caps;
gboolean googletalk;
GList *google_share_sessions;
+ GList *gtalk_xfer_list;
+
char *server_name;
char *gmail_last_time;
More information about the Commits
mailing list