# HG changeset patch # User Richard Laager # Date 1451411760 21600 # Node ID 92272063410165137736ecc3029c2b63c726b81e # Parent ef7d5e45fe84d16784d8700b974bc0e4c3be0c4f 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. diff -r ef7d5e45fe84 -r 922720634101 libpurple/plugins/codeinline.c --- 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("", 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; }