changeset 26561:4dc4d0aa25f5

Move some IQ handler registrations to the appropriate init functions
author Paul Aurich <paul@darkrain42.org>
date Sun, 05 Apr 2009 19:14:19 +0000
parents 36c435f55252
children 0c8d41f5caa0
files libpurple/protocols/jabber/ibb.c libpurple/protocols/jabber/iq.c libpurple/protocols/jabber/si.c
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/ibb.c	Sun Apr 05 19:05:49 2009 +0000
+++ b/libpurple/protocols/jabber/ibb.c	Sun Apr 05 19:14:19 2009 +0000
@@ -502,6 +502,10 @@
 jabber_ibb_init(void)
 {
 	jabber_ibb_sessions = g_hash_table_new(g_str_hash, g_str_equal);
+
+	jabber_iq_register_handler("close", XEP_0047_NAMESPACE, jabber_ibb_parse);
+	jabber_iq_register_handler("data", XEP_0047_NAMESPACE, jabber_ibb_parse);
+	jabber_iq_register_handler("open", XEP_0047_NAMESPACE, jabber_ibb_parse);
 }
 
 void
--- a/libpurple/protocols/jabber/iq.c	Sun Apr 05 19:05:49 2009 +0000
+++ b/libpurple/protocols/jabber/iq.c	Sun Apr 05 19:14:19 2009 +0000
@@ -417,7 +417,6 @@
 	jabber_iq_register_handler("query", "http://jabber.org/protocol/bytestreams", jabber_bytestreams_parse);
 	jabber_iq_register_handler("query", "http://jabber.org/protocol/disco#info", jabber_disco_info_parse);
 	jabber_iq_register_handler("query", "http://jabber.org/protocol/disco#items", jabber_disco_items_parse);
-	jabber_iq_register_handler("si", "http://jabber.org/protocol/si", jabber_si_parse);
 	jabber_iq_register_handler("query", "jabber:iq:last", jabber_iq_last_parse);
 	jabber_iq_register_handler("query", "jabber:iq:oob", jabber_oob_parse);
 	jabber_iq_register_handler("query", "jabber:iq:register", jabber_register_parse);
@@ -428,10 +427,6 @@
 	jabber_iq_register_handler("ping", "urn:xmpp:ping", jabber_ping_parse);
 	jabber_iq_register_handler("time", "urn:xmpp:time", jabber_iq_time_parse);
 
-	jabber_iq_register_handler("data", XEP_0047_NAMESPACE, jabber_ibb_parse);
-	jabber_iq_register_handler("close", XEP_0047_NAMESPACE, jabber_ibb_parse);
-	jabber_iq_register_handler("open", XEP_0047_NAMESPACE, jabber_ibb_parse);
-
 	jabber_iq_register_handler("jingle", JINGLE, jingle_parse);
 	jabber_iq_register_handler("query", GOOGLE_JINGLE_INFO_NAMESPACE,
 		jabber_google_handle_jingle_info);
--- a/libpurple/protocols/jabber/si.c	Sun Apr 05 19:05:49 2009 +0000
+++ b/libpurple/protocols/jabber/si.c	Sun Apr 05 19:14:19 2009 +0000
@@ -1677,6 +1677,8 @@
 void
 jabber_si_init(void)
 {
+	jabber_iq_register_handler("si", "http://jabber.org/protocol/si", jabber_si_parse);	
+	
 	jabber_ibb_register_open_handler(jabber_si_xfer_ibb_open_cb);
 }