changeset 26937:74c9f4f79825

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@gmail.com/desktop35DEABC4' to='paul@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...
author Paul Aurich <paul@darkrain42.org>
date Fri, 22 May 2009 05:31:46 +0000
parents e0f6c61ba779
children f2e4bc583e52
files libpurple/plugins/signals-test.c
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/signals-test.c	Fri May 22 05:09:12 2009 +0000
+++ b/libpurple/plugins/signals-test.c	Fri May 22 05:31:46 2009 +0000
@@ -630,8 +630,8 @@
 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 *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(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;