# HG changeset patch # User Mikael Berthe # Date 1301515368 -7200 # Node ID 024bdd1c64180097977aa5990fcd72245e2958b6 # Parent d4273346d52d0639d042dcfd754499f129fa98b0 Add a dummy handler for some unhandled IQ replies diff -r d4273346d52d -r 024bdd1c6418 mcabber/mcabber/xmpp.c --- a/mcabber/mcabber/xmpp.c Wed Mar 30 21:56:35 2011 +0200 +++ b/mcabber/mcabber/xmpp.c Wed Mar 30 22:02:48 2011 +0200 @@ -198,7 +198,9 @@ y = lm_message_node_add_child(iq->node, "query", NULL); lm_message_node_set_attribute(y, "xmlns", NS_REGISTER); lm_message_node_add_child(y, "remove", NULL); - lm_connection_send(lconnection, iq, NULL); + handler = lm_message_handler_new(handle_iq_dummy, NULL, FALSE); + lm_connection_send_with_reply(lconnection, iq, handler, NULL); + lm_message_handler_unref(handler); lm_message_unref(iq); } @@ -2038,6 +2040,7 @@ void send_storage(LmMessageNode *store) { LmMessage *iq; + LmMessageHandler *handler; LmMessageNode *query; if (!rosternotes) return; @@ -2048,7 +2051,9 @@ lm_message_node_set_attribute(query, "xmlns", NS_PRIVATE); lm_message_node_insert_childnode(query, store); - lm_connection_send(lconnection, iq, NULL); + handler = lm_message_handler_new(handle_iq_dummy, NULL, FALSE); + lm_connection_send_with_reply(lconnection, iq, handler, NULL); + lm_message_handler_unref(handler); lm_message_unref(iq); } diff -r d4273346d52d -r 024bdd1c6418 mcabber/mcabber/xmpp_muc.c --- a/mcabber/mcabber/xmpp_muc.c Wed Mar 30 21:56:35 2011 +0200 +++ b/mcabber/mcabber/xmpp_muc.c Wed Mar 30 22:02:48 2011 +0200 @@ -25,6 +25,7 @@ #include #include "xmpp_helper.h" +#include "xmpp_iq.h" #include "xmpp_muc.h" #include "events.h" #include "hooks.h" @@ -194,6 +195,7 @@ const char *reason) { LmMessage *iq; + LmMessageHandler *handler; LmMessageNode *query, *x; if (!xmpp_is_online() || !roomid) @@ -232,7 +234,9 @@ if (reason) lm_message_node_add_child(x, "reason", reason); - lm_connection_send(lconnection, iq, NULL); + handler = lm_message_handler_new(handle_iq_dummy, NULL, FALSE); + lm_connection_send_with_reply(lconnection, iq, handler, NULL); + lm_message_handler_unref(handler); lm_message_unref(iq); return 0; @@ -243,6 +247,7 @@ void xmpp_room_unlock(const char *room) { LmMessageNode *node; + LmMessageHandler *handler; LmMessage *iq; if (!xmpp_is_online() || !room) @@ -257,7 +262,9 @@ lm_message_node_set_attributes(node, "xmlns", "jabber:x:data", "type", "submit", NULL); - lm_connection_send(lconnection, iq, NULL); + handler = lm_message_handler_new(handle_iq_dummy, NULL, FALSE); + lm_connection_send_with_reply(lconnection, iq, handler, NULL); + lm_message_handler_unref(handler); lm_message_unref(iq); } @@ -266,6 +273,7 @@ void xmpp_room_destroy(const char *room, const char *venue, const char *reason) { LmMessage *iq; + LmMessageHandler *handler; LmMessageNode *query, *x; if (!xmpp_is_online() || !room) @@ -283,7 +291,9 @@ if (reason) lm_message_node_add_child(x, "reason", reason); - lm_connection_send(lconnection, iq, NULL); + handler = lm_message_handler_new(handle_iq_dummy, NULL, FALSE); + lm_connection_send_with_reply(lconnection, iq, handler, NULL); + lm_message_handler_unref(handler); lm_message_unref(iq); }