Fix the writing-im-msg callback in codeinline.c

Tue, 29 Dec 2015 11:56:00 -0600

author
Richard Laager <rlaager@pidgin.im>
date
Tue, 29 Dec 2015 11:56:00 -0600
changeset 37482
922720634101
parent 37481
ef7d5e45fe84
child 37484
78d036e70f8e

Fix the writing-im-msg callback in codeinline.c

This is similar to the fix in signals-test.c that I just commited from
Koosha Khajehmoogahi. I haven't tested it, but it's consistent with
the other signal handler in this file.

libpurple/plugins/codeinline.c file | annotate | diff | comparison | revisions
--- a/libpurple/plugins/codeinline.c	Tue Jun 23 04:16:41 2015 +0200
+++ b/libpurple/plugins/codeinline.c	Tue Dec 29 11:56:00 2015 -0600
@@ -41,15 +41,11 @@
   return g_strjoinv("</font>", ms);
 }
 
-static gboolean outgoing_msg_cb1(PurpleAccount *account, const char *who, char **message,
-					PurpleConversation *conv, PurpleMessageFlags flags, gpointer null)
+static gboolean outgoing_msg_cb1(PurpleConversation *conv, PurpleMessage *msg,
+	gpointer null)
 {
-	char *m;
-
-	m = outgoing_msg_common(*message);
-	g_free(*message);
-	*message = m;
-
+	purple_message_set_contents(msg,
+		outgoing_msg_common(purple_message_get_contents(msg)));
 	return FALSE;
 }
 

mercurial