Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/xmpp_muc.c @ 1994:024bdd1c6418
Add a dummy handler for some unhandled IQ replies
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 30 Mar 2011 22:02:48 +0200 |
parents | 6febc7d1f760 |
children | e0aedfa091ec |
line wrap: on
line diff
--- 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 <stdlib.h> #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); }