/soc/2015/nakulgulati/main: 7cb1dfac3192: hangouts: channel gsid...

Nakul at rock.pidgin.im Nakul at rock.pidgin.im
Wed Aug 12 12:42:04 EDT 2015


Changeset: 7cb1dfac31927d91e03f4414dbf6be61ae0a207f
Author:	 Nakul Gulati
Date:	 2015-08-13 00:41 +0800
Branch:	 hangouts
URL: https://hg.pidgin.im/soc/2015/nakulgulati/main/rev/7cb1dfac3192

Description:

hangouts: channel gsid bug fix

diffstat:

 libpurple/protocols/hangouts/channel.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (22 lines):

diff --git a/libpurple/protocols/hangouts/channel.c b/libpurple/protocols/hangouts/channel.c
--- a/libpurple/protocols/hangouts/channel.c
+++ b/libpurple/protocols/hangouts/channel.c
@@ -1,3 +1,4 @@
+#include <string.h>
 #include <glib.h>
 
 #include "connection.h"
@@ -96,10 +97,11 @@ hangouts_channel_get_gsid_cb (PurpleHttp
 
   channel = user_data;
   res_raw = purple_http_response_get_data (response, NULL);
+  res_raw = strstr (res_raw, "\n");
+  res_raw++;
   node = hangouts_json_node_new (res_raw, -1, FALSE);
   channel->priv->sid = hangouts_json_node_get_str (node, "$[0][1][1]", NULL);
-  channel->priv->gession_id = hangouts_json_node_get_str(node, "$[1][1][0].gsid", NULL);
-  purple_debug_misc ("hangouts-channel", "gsid: %s", channel->priv->gession_id);
+  channel->priv->gession_id = hangouts_json_node_get_str (node, "$[1][1][0].gsid", NULL);
 
   json_node_free (node);
 }



More information about the Commits mailing list