comparison mcabber/mcabber/xmpp.c @ 1721:8cfc2a386b1f

Do not display Unhandled IQ request stanzas in the log window They are now only written to the tracelog file (if enabled).
author Mikael Berthe <mikael@lilotux.net>
date Sun, 28 Feb 2010 10:20:13 +0100
parents 98d99485d276
children b18142457ca9
comparison
equal deleted inserted replaced
1720:98d99485d276 1721:8cfc2a386b1f
1446 static LmHandlerResult handle_iq(LmMessageHandler *handler, 1446 static LmHandlerResult handle_iq(LmMessageHandler *handler,
1447 LmConnection *connection, 1447 LmConnection *connection,
1448 LmMessage *m, gpointer user_data) 1448 LmMessage *m, gpointer user_data)
1449 { 1449 {
1450 int i; 1450 int i;
1451 guint dbgflg;
1452 const char *xmlns = NULL; 1451 const char *xmlns = NULL;
1453 LmMessageNode *x; 1452 LmMessageNode *x;
1454 LmMessageSubType mstype = lm_message_get_sub_type(m); 1453 LmMessageSubType mstype = lm_message_get_sub_type(m);
1455 1454
1456 if (mstype == LM_MESSAGE_SUB_TYPE_ERROR) { 1455 if (mstype == LM_MESSAGE_SUB_TYPE_ERROR) {
1469 1468
1470 if ((mstype == LM_MESSAGE_SUB_TYPE_SET) || 1469 if ((mstype == LM_MESSAGE_SUB_TYPE_SET) ||
1471 (mstype == LM_MESSAGE_SUB_TYPE_GET)) 1470 (mstype == LM_MESSAGE_SUB_TYPE_GET))
1472 send_iq_error(connection, m, XMPP_ERROR_NOT_IMPLEMENTED); 1471 send_iq_error(connection, m, XMPP_ERROR_NOT_IMPLEMENTED);
1473 1472
1474 if (mstype == LM_MESSAGE_SUB_TYPE_RESULT) 1473 scr_LogPrint(LPRINT_DEBUG, "Unhandled IQ: %s", lm_message_node_to_string(m->node));
1475 dbgflg = LPRINT_DEBUG; 1474
1476 else 1475 if (mstype != LM_MESSAGE_SUB_TYPE_RESULT) {
1477 dbgflg = LPRINT_NORMAL|LPRINT_DEBUG; 1476 scr_LogPrint(LPRINT_NORMAL, "Received unhandled IQ request from <%s>.",
1478 1477 lm_message_get_from(m));
1479 scr_LogPrint(dbgflg, "Unhandled IQ: %s", lm_message_node_to_string(m->node)); 1478 }
1479
1480 return LM_HANDLER_RESULT_REMOVE_MESSAGE; 1480 return LM_HANDLER_RESULT_REMOVE_MESSAGE;
1481 } 1481 }
1482 1482
1483 static LmHandlerResult handle_s10n(LmMessageHandler *handler, 1483 static LmHandlerResult handle_s10n(LmMessageHandler *handler,
1484 LmConnection *connection, 1484 LmConnection *connection,