comparison mcabber/src/xmpp.c @ 1621:eec2fa456d0f

Do not print Unhandled IQ results to the log window
author Mikael Berthe <mikael@lilotux.net>
date Wed, 14 Oct 2009 23:22:37 +0200
parents 4c7104ec5f3b
children e3afe1da8a5f
comparison
equal deleted inserted replaced
1620:52b63087f421 1621:eec2fa456d0f
1400 static LmHandlerResult handle_iq(LmMessageHandler *handler, 1400 static LmHandlerResult handle_iq(LmMessageHandler *handler,
1401 LmConnection *connection, 1401 LmConnection *connection,
1402 LmMessage *m, gpointer user_data) 1402 LmMessage *m, gpointer user_data)
1403 { 1403 {
1404 int i; 1404 int i;
1405 guint dbgflg;
1405 const char *xmlns = NULL; 1406 const char *xmlns = NULL;
1406 LmMessageNode *x; 1407 LmMessageNode *x;
1407 1408
1408 for (x = m->node->children; x; x=x->next) { 1409 for (x = m->node->children; x; x=x->next) {
1409 xmlns = lm_message_node_get_attribute(x, "xmlns"); 1410 xmlns = lm_message_node_get_attribute(x, "xmlns");
1421 1422
1422 if ((lm_message_get_sub_type(m) == LM_MESSAGE_SUB_TYPE_SET) || 1423 if ((lm_message_get_sub_type(m) == LM_MESSAGE_SUB_TYPE_SET) ||
1423 (lm_message_get_sub_type(m) == LM_MESSAGE_SUB_TYPE_GET)) 1424 (lm_message_get_sub_type(m) == LM_MESSAGE_SUB_TYPE_GET))
1424 send_iq_error(connection, m, XMPP_ERROR_NOT_IMPLEMENTED); 1425 send_iq_error(connection, m, XMPP_ERROR_NOT_IMPLEMENTED);
1425 1426
1426 scr_LogPrint(LPRINT_NORMAL|LPRINT_DEBUG, "Unhandled IQ: %s", 1427 if (lm_message_get_sub_type(m) == LM_MESSAGE_SUB_TYPE_RESULT)
1427 lm_message_node_to_string(m->node)); 1428 dbgflg = LPRINT_DEBUG;
1429 else
1430 dbgflg = LPRINT_NORMAL|LPRINT_DEBUG;
1431
1432 scr_LogPrint(dbgflg, "Unhandled IQ: %s", lm_message_node_to_string(m->node));
1428 return LM_HANDLER_RESULT_REMOVE_MESSAGE; 1433 return LM_HANDLER_RESULT_REMOVE_MESSAGE;
1429 } 1434 }
1430 1435
1431 static LmHandlerResult handle_s10n(LmMessageHandler *handler, 1436 static LmHandlerResult handle_s10n(LmMessageHandler *handler,
1432 LmConnection *connection, 1437 LmConnection *connection,