/soc/2013/ashmew2/filetransferY: a40aba739fe4: CrashFix. Fixed a...
Ashish Gupta
ashmew2 at gmail.com
Sat Sep 21 12:05:46 EDT 2013
Changeset: a40aba739fe4b470b0abb1e9feb5093c5e4f4e5a
Author: Ashish Gupta <ashmew2 at gmail.com>
Date: 2013-09-21 19:25 +0530
Branch: filetransferX
URL: https://hg.pidgin.im/soc/2013/ashmew2/filetransferY/rev/a40aba739fe4
Description:
CrashFix. Fixed a buggy google_session_d_equal() call.
diffstat:
libpurple/protocols/jabber/google/google_session.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (48 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
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
+#include <stdlib.h>
#include "internal.h"
#include "debug.h"
#include "google_session.h"
@@ -2398,7 +2399,7 @@ google_session_parse_iq(JabberStream *js
static gboolean local_received=FALSE, stun_received=FALSE;
xmlnode *candidate, *transport;
- purple_debug_info("google_session", "\nType of IQ being parsed : %s\n",type);
+ purple_debug_info("google_session", "Type of IQ being parsed : %s\n",type);
if (!strcmp(type, "initiate")) {
google_session_handle_initiate(js, session, sess, iq_id);
@@ -2463,9 +2464,11 @@ jabber_google_session_parse(JabberStream
iter = purple_media_manager_get_media_by_account(
purple_media_manager_get(),
purple_connection_get_account(js->gc));
+
for (; iter; iter = g_list_delete_link(iter, iter)) {
GoogleSession *gsession =
purple_media_get_prpl_data(iter->data);
+
if (google_session_id_equal(&(gsession->id), &id)) {
session = gsession;
break;
@@ -2491,8 +2494,13 @@ jabber_google_session_parse(JabberStream
for(; iter; iter=iter->next) {
GoogleSession *gsession = (GoogleSession *)(iter->data);
-
- if (!google_session_id_equal(session, gsession)) {
+ if(!gsession)
+ {
+ purple_debug_info("google_session", "Fatal Error. gsession shouldn't be NULL..");
+ /*TODO: Remove the exit(0) line once gtalk xfer support is complete*/
+ exit(0);
+ }
+ if (google_session_id_equal(&id, &(gsession->id))) {
session = gsession;
break;
/*TODO: Ensure this works. Found a GoogleSession*/
More information about the Commits
mailing list