/pidgin/main: 991cb7ca5eb6: MXit: Append the inline-image refere...

Andrew Victor andrew.victor at mxit.com
Wed Apr 3 05:38:59 EDT 2013


Changeset: 991cb7ca5eb6548fdd82271fe01733efb95187b7
Author:	 Andrew Victor <andrew.victor at mxit.com>
Date:	 2013-04-03 11:32 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/991cb7ca5eb6

Description:

MXit: Append the inline-image reference directly to the message buffer.
It's really not neccessary to use a temporary buffer.

diffstat:

 libpurple/protocols/mxit/formcmds.c |  4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diffs (21 lines):

diff --git a/libpurple/protocols/mxit/formcmds.c b/libpurple/protocols/mxit/formcmds.c
--- a/libpurple/protocols/mxit/formcmds.c
+++ b/libpurple/protocols/mxit/formcmds.c
@@ -325,7 +325,6 @@ static void command_image(struct RXMsgDa
 	const char*	img;
 	const char*	reply;
 	guchar*		rawimg;
-	char		link[256];
 	gsize		rawimglen;
 	int			imgid;
 
@@ -334,8 +333,7 @@ static void command_image(struct RXMsgDa
 		rawimg = purple_base64_decode(img, &rawimglen);
 		//purple_util_write_data_to_file_absolute("/tmp/mxitinline.png", (char*) rawimg, rawimglen);
 		imgid = purple_imgstore_add_with_id(rawimg, rawimglen, NULL);
-		g_snprintf(link, sizeof(link), "<img id=\"%i\">", imgid);
-		g_string_append_printf(msg, "%s", link);
+		g_string_append_printf(msg, "<img id=\"%i\">", imgid);
 		mx->flags |= PURPLE_MESSAGE_IMAGES;
 	}
 	else {



More information about the Commits mailing list