# HG changeset patch # User Etan Reisner # Date 1242965318 0 # Node ID f500336f9881f7893f69ddbda78afa84b2b4c97e # Parent a8537bbcfb79db788c168338a160654683a676eb Fix building on Windows and better integrate the new signals with the pre-existing ones. committer: Paul Aurich diff -r a8537bbcfb79 -r f500336f9881 libpurple/protocols/jabber/jabber.c --- 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); diff -r a8537bbcfb79 -r f500336f9881 libpurple/protocols/jabber/libxmpp.c --- 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; }