/pidgin/main: 922720634101: Fix the writing-im-msg callback in c...

Richard Laager <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 92272063410165137736ecc3029c2b63c726b81e
Author:	 Richard Laager <[email protected]>
Date:	 2015-12-29 11:56 -0600
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/922720634101

Description:

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.

diffstat:

 libpurple/plugins/codeinline.c |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (23 lines):

diff --git a/libpurple/plugins/codeinline.c b/libpurple/plugins/codeinline.c
--- a/libpurple/plugins/codeinline.c
+++ b/libpurple/plugins/codeinline.c
@@ -41,15 +41,11 @@ outgoing_msg_common(const char *message)
   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;
 }
 

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.