changeset 30010:80933c92c080

Move a debug message. I'm assuming it's supposed to be related to this icq_relay_xstatus thing? The previous version of the code printing this message even if msgtype != 26... that was probably wrong. Also only free rtfmsg if it's non-NULL (we already have a check for that, might as well use it)
author Mark Doliner <mark@kingant.net>
date Thu, 18 Mar 2010 08:05:29 +0000
parents 8d4bed3021dc
children 855620e59e0e
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Thu Mar 18 07:55:17 2010 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Thu Mar 18 08:05:29 2010 +0000
@@ -2720,7 +2720,6 @@
 	{
 		purple_debug_info("oscar", "Got an ICQ Server Relay message of "
 				"type %d\n", args->info.rtfmsg.msgtype);
-		purple_debug_info("oscar", "Sending X-Status Reply\n");
 
 		if (args->info.rtfmsg.msgtype == 1)
 		{
@@ -2736,11 +2735,13 @@
 					if (g_utf8_validate(args->info.rtfmsg.rtfmsg, strlen(args->info.rtfmsg.rtfmsg), NULL))
 						rtfmsg = g_strdup(args->info.rtfmsg.rtfmsg);
 				}
-				if (rtfmsg)
+				if (rtfmsg) {
 					serv_got_im(gc, userinfo->bn, rtfmsg, flags, time(NULL));
-				g_free(rtfmsg);
+					g_free(rtfmsg);
+				}
 			}
-		} else if(args->info.rtfmsg.msgtype == 26)
+		} else if (args->info.rtfmsg.msgtype == 26)
+			purple_debug_info("oscar", "Sending X-Status Reply\n");
 			icq_relay_xstatus(od, userinfo->bn, args->cookie);
 
 	}