pidgin: d62410ed: Add 'jabber' to the signals output and N...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri May 22 01:35:51 EDT 2009


-----------------------------------------------------------------
Revision: d62410ed64c89b0439756c956b6ed4a91b3152cc
Ancestor: 7d05235d2c1a49697d1c5064fccd9f3b96ec72b6
Author: darkrain42 at pidgin.im
Date: 2009-05-22T05:31:46
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d62410ed64c89b0439756c956b6ed4a91b3152cc

Modified files:
        libpurple/plugins/signals-test.c

ChangeLog: 

Add 'jabber' to the signals output and NULL checking so it won't crash on Windows

I'm baffled, but I currently get this signal output for the jabber-receiving-message signal:
(22:27:44) jabber: Recv (ssl)(307): <message from='paul.aurich at gmail.com/desktop35DEABC4' to='paul at darkrain42.org/Testing' type='chat' id='purpleabb8c602'><active xmlns='http://jabber.org/protocol/chatstates'/><nos:x value='disabled' xmlns:nos='google:nosave'/><arc:record otr='false' xmlns:arc='http://jabber.org/protocol/archive'/></message>
(22:27:44) signals test: received message (type=chat, id=purpleabb8c602, from=(null) to=chat) (nil)

presence and IQ are fine...

-------------- next part --------------
============================================================
--- libpurple/plugins/signals-test.c	cad02c444d9d6c567dc3cc98be93537d5b4fb912
+++ libpurple/plugins/signals-test.c	b02b437c5106a8ba6f4cc380472f5161cad87807
@@ -630,8 +630,8 @@ jabber_iq_received(PurpleConnection *pc,
 jabber_iq_received(PurpleConnection *pc, const char *type, const char *id,
                    const char *from, xmlnode *iq)
 {
-	purple_debug_misc("signals test", "received IQ (type=%s, id=%s, from=%s) %p\n",
-	                  type, id, from, iq);
+	purple_debug_misc("signals test", "jabber IQ (type=%s, id=%s, from=%s) %p\n",
+	                  type, id, from ? from : "(null)", iq);
 
 	/* We don't want the plugin to stop processing */
 	return FALSE;
@@ -641,9 +641,10 @@ jabber_message_received(PurpleConnection
 jabber_message_received(PurpleConnection *pc, const char *type, const char *id,
                         const char *from, const char *to, xmlnode *message)
 {
-	purple_debug_misc("signals test", "received message (type=%s, id=%s, "
+	purple_debug_misc("signals test", "jabber message (type=%s, id=%s, "
 	                  "from=%s to=%s) %p\n",
-	                  type, id, from, to, message);
+	                  type ? type : "(null)", id ? id : "(null)",
+	                  from ? from : "(null)", to ? to : "(null)", message);
 
 	/* We don't want the plugin to stop processing */
 	return FALSE;
@@ -653,8 +654,8 @@ jabber_presence_received(PurpleConnectio
 jabber_presence_received(PurpleConnection *pc, const char *type,
                          const char *from, xmlnode *presence)
 {
-	purple_debug_misc("signals test", "received presence (type=%s, from=%s) %p\n",
-	                  type, from, presence);
+	purple_debug_misc("signals test", "jabber presence (type=%s, from=%s) %p\n",
+	                  type ? type : "(null)", from ? from : "(null)", presence);
 
 	/* We don't want the plugin to stop processing */
 	return FALSE;


More information about the Commits mailing list