Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/xmpp.c @ 1701:44e023ad99ed
Add dummy handler for roster manipulation IQ responses
This clears up the "Unhandled IQ" messages, only errors should displayed now.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 07 Feb 2010 19:13:33 +0100 |
parents | 32c6d81bd1ef |
children | ac881b5f9248 |
line wrap: on
line diff
--- a/mcabber/mcabber/xmpp.c Sun Feb 07 17:34:00 2010 +0100 +++ b/mcabber/mcabber/xmpp.c Sun Feb 07 19:13:33 2010 +0100 @@ -106,6 +106,7 @@ { LmMessageNode *query, *y; LmMessage *iq; + LmMessageHandler *handler; char *cleanjid; if (!xmpp_is_online()) @@ -129,7 +130,9 @@ if (group) lm_message_node_add_child(y, "group", group); - 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); xmpp_send_s10n(cleanjid, LM_MESSAGE_SUB_TYPE_SUBSCRIBE); @@ -144,6 +147,7 @@ void xmpp_updatebuddy(const char *bjid, const char *name, const char *group) { LmMessage *iq; + LmMessageHandler *handler; LmMessageNode *x; char *cleanjid; @@ -167,7 +171,9 @@ if (group) lm_message_node_add_child(x, "group", group); - 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); g_free(cleanjid); } @@ -176,6 +182,7 @@ { LmMessageNode *y, *z; LmMessage *iq; + LmMessageHandler *handler; char *cleanjid; if (!xmpp_is_online()) @@ -211,7 +218,9 @@ "jid", cleanjid, "subscription", "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); roster_del_user(cleanjid);