Do not display Unhandled IQ request stanzas in the log window
authorMikael Berthe <mikael@lilotux.net>
Sun, 28 Feb 2010 10:20:13 +0100
changeset 1721 8cfc2a386b1f
parent 1720 98d99485d276
child 1722 b18142457ca9
Do not display Unhandled IQ request stanzas in the log window They are now only written to the tracelog file (if enabled).
mcabber/mcabber/xmpp.c
--- a/mcabber/mcabber/xmpp.c	Thu Feb 25 21:26:15 2010 +0100
+++ b/mcabber/mcabber/xmpp.c	Sun Feb 28 10:20:13 2010 +0100
@@ -1448,7 +1448,6 @@
                                  LmMessage *m, gpointer user_data)
 {
   int i;
-  guint dbgflg;
   const char *xmlns = NULL;
   LmMessageNode *x;
   LmMessageSubType mstype = lm_message_get_sub_type(m);
@@ -1471,12 +1470,13 @@
       (mstype == LM_MESSAGE_SUB_TYPE_GET))
     send_iq_error(connection, m, XMPP_ERROR_NOT_IMPLEMENTED);
 
-  if (mstype == LM_MESSAGE_SUB_TYPE_RESULT)
-    dbgflg = LPRINT_DEBUG;
-  else
-    dbgflg = LPRINT_NORMAL|LPRINT_DEBUG;
+  scr_LogPrint(LPRINT_DEBUG, "Unhandled IQ: %s", lm_message_node_to_string(m->node));
 
-  scr_LogPrint(dbgflg, "Unhandled IQ: %s", lm_message_node_to_string(m->node));
+  if (mstype != LM_MESSAGE_SUB_TYPE_RESULT) {
+    scr_LogPrint(LPRINT_NORMAL, "Received unhandled IQ request from <%s>.",
+                 lm_message_get_from(m));
+  }
+
   return LM_HANDLER_RESULT_REMOVE_MESSAGE;
 }