/cpw/tomkiewicz/gg11: 62528926bcd2: Handle inline image filename...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Wed Sep 19 08:00:29 EDT 2012


Changeset: 62528926bcd2fd1cd3998809d43289814721d6da
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-09-19 14:00 +0200
Branch:	 default
URL: http://hg.pidgin.im/cpw/tomkiewicz/gg11/rev/62528926bcd2

Description:

Handle inline image filenames in the same way as GG11

diffstat:

 libpurple/protocols/gg/image.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (38 lines):

diff --git a/libpurple/protocols/gg/image.c b/libpurple/protocols/gg/image.c
--- a/libpurple/protocols/gg/image.c
+++ b/libpurple/protocols/gg/image.c
@@ -175,10 +175,11 @@ void ggp_image_recv(PurpleConnection *gc
 	id = ggp_image_params_to_id(image_reply->crc32, image_reply->size);
 	
 	purple_debug_info("gg", "ggp_image_recv: got image "
-		"[stored_id=%d, crc=%u, size=%u, id=%016llx]\n",
+		"[stored_id=%d, crc=%u, size=%u, filename=%s, id=%016llx]\n",
 		stored_id,
 		image_reply->crc32,
 		image_reply->size,
+		image_reply->filename,
 		id);
 
 	g_hash_table_insert(sdata->got_images, ggp_uint64dup(id),
@@ -212,6 +213,7 @@ void ggp_image_send(PurpleConnection *gc
 	PurpleStoredImage *image;
 	PurpleConversation *conv;
 	uint64_t id;
+	gchar *gg_filename;
 	
 	purple_debug_info("gg", "ggp_image_send: got image request "
 		"[uin=%u, crc=%u, size=%u]\n",
@@ -248,10 +250,12 @@ void ggp_image_send(PurpleConnection *gc
 	}
 	
 	//TODO: check allowed recipients
+	gg_filename = g_strdup_printf("%016llx", id);
 	gg_image_reply(accdata->session, image_request->sender,
-		purple_imgstore_get_filename(image),
+		gg_filename,
 		purple_imgstore_get_data(image),
 		purple_imgstore_get_size(image));
+	g_free(gg_filename);
 	purple_imgstore_unref(image); /* conferences? */
 	
 	conv = purple_find_conversation_with_account(



More information about the Commits mailing list