Mercurial > pidgin
changeset 26933:f500336f9881
Fix building on Windows and better integrate the new signals with the pre-existing ones.
committer: Paul Aurich <paul@darkrain42.org>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Fri, 22 May 2009 04:08:38 +0000 |
parents | a8537bbcfb79 |
children | c162a088489f |
files | libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/libxmpp.c |
diffstat | 2 files changed, 5 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Fri May 22 03:54:29 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Fri May 22 04:08:38 2009 +0000 @@ -67,7 +67,7 @@ #define JABBER_CONNECT_STEPS (js->gsc ? 9 : 5) -static PurplePlugin *my_protocol = NULL; +PurplePlugin *jabber_plugin = NULL; GList *jabber_features = NULL; GList *jabber_identities = NULL; GSList *jabber_cmds = NULL; @@ -252,7 +252,7 @@ { const char *xmlns; - purple_signal_emit(my_protocol, "jabber-receiving-xmlnode", js->gc, packet); + purple_signal_emit(jabber_plugin, "jabber-receiving-xmlnode", js->gc, packet); /* if the signal leaves us with a null packet, we're done */ if(NULL == *packet) @@ -406,7 +406,7 @@ /* If we've got a security layer, we need to encode the data, * splitting it on the maximum buffer length negotiated */ - purple_signal_emit(my_protocol, "jabber-sending-text", js->gc, &data); + purple_signal_emit(jabber_plugin, "jabber-sending-text", js->gc, &data); if (data == NULL) return; @@ -458,7 +458,7 @@ char *txt; int len; - purple_signal_emit(my_protocol, "jabber-sending-xmlnode", js->gc, &packet); + purple_signal_emit(jabber_plugin, "jabber-sending-xmlnode", js->gc, &packet); /* if we get NULL back, we're done processing */ if(NULL == packet) @@ -3331,7 +3331,7 @@ void jabber_init_plugin(PurplePlugin *plugin) { - my_protocol = plugin; + jabber_plugin = plugin; jabber_add_identity("client", "pc", NULL, PACKAGE);
--- a/libpurple/protocols/jabber/libxmpp.c Fri May 22 03:54:29 2009 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Fri May 22 04:08:38 2009 +0000 @@ -46,8 +46,6 @@ #include "data.h" #include "ibb.h" -PurplePlugin *jabber_plugin = NULL; - static PurplePluginProtocolInfo prpl_info = { OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME | OPT_PROTO_MAIL_CHECK | @@ -127,8 +125,6 @@ static gboolean load_plugin(PurplePlugin *plugin) { - jabber_plugin = plugin; - purple_signal_register(plugin, "jabber-receiving-xmlnode", purple_marshal_VOID__POINTER_POINTER, NULL, 2, purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_CONNECTION), @@ -219,8 +215,6 @@ /* Stay on target...stay on target... Almost there... */ jabber_uninit_plugin(); - jabber_plugin = NULL; - return TRUE; }