pidgin/pidgin

922720634101
Parents ef7d5e45fe84
Children 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.
--- 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;
}