Mercurial > pidgin.yaz
changeset 19704:892a99da5c5f
merge of '65633fb10f29f8d7b1f99b635452d4ed5fe1f3cb'
and '707a973302123080a12212e50da8df7608b382a7'
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 10 Sep 2007 14:47:42 +0000 |
parents | 0a87fc5a4e60 (current diff) 680a3aea5eb6 (diff) |
children | 7ea794e7cec3 |
files | |
diffstat | 10 files changed, 47 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/Makefile.mingw Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/Makefile.mingw Mon Sep 10 14:47:42 2007 +0000 @@ -42,8 +42,11 @@ ## ## SOURCES, OBJECTS ## -C_SRC = auth.c \ +C_SRC = \ + adhoccommands.c \ + auth.c \ buddy.c \ + caps.c \ chat.c \ disco.c \ google.c \ @@ -53,10 +56,14 @@ message.c \ oob.c \ parser.c \ + pep.c \ ping.c \ presence.c \ roster.c \ si.c \ + usermood.c \ + usernick.c \ + usertune.c \ xdata.c \ win32/posix.uname.c
--- a/libpurple/protocols/jabber/adhoccommands.c Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/adhoccommands.c Mon Sep 10 14:47:42 2007 +0000 @@ -19,6 +19,8 @@ * */ +#include "internal.h" + #include "adhoccommands.h" #include <assert.h> #include <string.h> @@ -264,7 +266,7 @@ jabber_iq_send(iq); } -void jabber_adhoc_server_execute(PurplePluginAction *action) { +static void jabber_adhoc_server_execute(PurplePluginAction *action) { JabberAdHocCommands *cmd = action->user_data; if(cmd) { PurpleConnection *gc = (PurpleConnection *) action->context;
--- a/libpurple/protocols/jabber/caps.c Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/caps.c Mon Sep 10 14:47:42 2007 +0000 @@ -19,6 +19,8 @@ * */ +#include "internal.h" + #include "caps.h" #include <string.h> #include "internal.h" @@ -464,19 +466,22 @@ JabberCapsValue *client; JabberCapsKey *key = g_new0(JabberCapsKey, 1); char *originalext = g_strdup(ext); - char *oneext, *ctx; jabber_caps_cbplususerdata *userdata = g_new0(jabber_caps_cbplususerdata, 1); userdata->cb = cb; userdata->user_data = user_data; userdata->who = g_strdup(who); userdata->node = g_strdup(node); userdata->ver = g_strdup(ver); - - if(originalext) - for(oneext = strtok_r(originalext, " ", &ctx); oneext; oneext = strtok_r(NULL, " ", &ctx)) { - userdata->ext = g_list_append(userdata->ext,g_strdup(oneext)); + + if(originalext) { + gchar **tmp; + gchar **splat = g_strsplit(originalext, " ", 0); + for(tmp = splat; *tmp; tmp++) { + userdata->ext = g_list_append(userdata->ext, tmp); ++userdata->extOutstanding; } + g_free(splat); + } g_free(originalext); key->node = g_strdup(node);
--- a/libpurple/protocols/jabber/jabber.h Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/jabber.h Mon Sep 10 14:47:42 2007 +0000 @@ -34,7 +34,7 @@ JABBER_CAP_IQ_SEARCH = 1 << 7, JABBER_CAP_IQ_REGISTER = 1 << 8, - /* Google Talk extensions: + /* Google Talk extensions: * http://code.google.com/apis/talk/jep_extensions/extensions.html */ JABBER_CAP_GMAIL_NOTIFY = 1 << 9,
--- a/libpurple/protocols/jabber/pep.c Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/pep.c Mon Sep 10 14:47:42 2007 +0000 @@ -19,6 +19,8 @@ * */ +#include "internal.h" + #include "pep.h" #include "iq.h" #include <string.h> @@ -107,21 +109,22 @@ void jabber_pep_publish(JabberStream *js, xmlnode *publish) { JabberIq *iq; - + xmlnode *pubsub; + if(js->pep != TRUE) { /* ignore when there's no PEP support on the server */ xmlnode_free(publish); return; } - + iq = jabber_iq_new(js, JABBER_IQ_SET); - - xmlnode *pubsub = xmlnode_new("pubsub"); + + pubsub = xmlnode_new("pubsub"); xmlnode_set_namespace(pubsub, "http://jabber.org/protocol/pubsub"); - + xmlnode_insert_child(pubsub, publish); - + xmlnode_insert_child(iq->node, pubsub); - + jabber_iq_send(iq); }
--- a/libpurple/protocols/jabber/presence.c Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/presence.c Mon Sep 10 14:47:42 2007 +0000 @@ -209,9 +209,9 @@ js->old_length = length; js->old_track = g_strdup(track); } - -#undef CHANGED(a,b) - + +#undef CHANGED + jabber_presence_fake_to_self(js, status); }
--- a/libpurple/protocols/jabber/usermood.c Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/usermood.c Mon Sep 10 14:47:42 2007 +0000 @@ -19,6 +19,8 @@ * */ +#include "internal.h" + #include "usermood.h" #include "pep.h" #include <assert.h> @@ -125,18 +127,17 @@ } } if (newmood != NULL) { + const char *status_id; JabberBuddyResource *resource = jabber_buddy_find_resource(buddy, NULL); if(!resource) { /* huh? */ - if (moodtext) - g_free(moodtext); + g_free(moodtext); return; } - const char *status_id = jabber_buddy_state_get_status_id(resource->state); - + status_id = jabber_buddy_state_get_status_id(resource->state); + purple_prpl_got_user_status(js->gc->account, from, status_id, "mood", _(newmood), "moodtext", moodtext?moodtext:"", NULL); } - if (moodtext) - g_free(moodtext); + g_free(moodtext); } void jabber_mood_init(void) {
--- a/libpurple/protocols/jabber/usernick.c Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/usernick.c Mon Sep 10 14:47:42 2007 +0000 @@ -19,6 +19,8 @@ * */ +#include "internal.h" + #include "usernick.h" #include "pep.h" #include <assert.h>
--- a/libpurple/protocols/jabber/usertune.c Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/usertune.c Mon Sep 10 14:47:42 2007 +0000 @@ -19,6 +19,8 @@ * */ +#include "internal.h" + #include "usertune.h" #include "pep.h" #include <assert.h>
--- a/libpurple/protocols/jabber/xdata.c Mon Sep 10 14:19:33 2007 +0000 +++ b/libpurple/protocols/jabber/xdata.c Mon Sep 10 14:47:42 2007 +0000 @@ -172,8 +172,8 @@ data->values = g_slist_delete_link(data->values, data->values); } if (data->actions) { + GList *action; hasActions = TRUE; - GList *action; for(action = data->actions; action; action = g_list_next(action)) { g_free(action->data); }