pidgin: a582dd33: jabber: Fix Google connecting. I wish t...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Sun Dec 6 00:11:44 EST 2009
-----------------------------------------------------------------
Revision: a582dd339f019301adca693df4b1a8fb135a1774
Ancestor: 219b3128f3d96b126a9ed9aff2d2f3277e69dbd4
Author: darkrain42 at pidgin.im
Date: 2009-12-06T04:31:39
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a582dd339f019301adca693df4b1a8fb135a1774
Modified files:
libpurple/protocols/jabber/google.c
ChangeLog:
jabber: Fix Google connecting. I wish this weren't off on its own, all sad and lonely.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/google.c d09d5f1cd3a2480e3fed8b8ee167a5bae32a6a6f
+++ libpurple/protocols/jabber/google.c 10422c32c921719c3e97be6fab05ac124662993e
@@ -30,6 +30,7 @@
#include "google.h"
#include "jabber.h"
#include "presence.h"
+#include "roster.h"
#include "iq.h"
#include "chat.h"
@@ -949,6 +950,18 @@ void jabber_gmail_init(JabberStream *js)
jabber_iq_send(iq);
}
+static void
+roster_init_cb(JabberStream *js, const char *from, JabberIqType type,
+ const char *id, xmlnode *packet, gpointer data)
+{
+ xmlnode *query = xmlnode_get_child(packet, "query");
+
+ if (type == JABBER_IQ_RESULT && query)
+ jabber_roster_parse(js, from, type, id, query);
+
+ jabber_stream_set_state(js, JABBER_STREAM_CONNECTED);
+}
+
void jabber_google_roster_init(JabberStream *js)
{
JabberIq *iq;
@@ -960,6 +973,7 @@ void jabber_google_roster_init(JabberStr
xmlnode_set_attrib(query, "xmlns:gr", "google:roster");
xmlnode_set_attrib(query, "gr:ext", "2");
+ jabber_iq_set_callback(iq, roster_init_cb, NULL);
jabber_iq_send(iq);
}
More information about the Commits
mailing list