pidgin: e9ea8bc5: When somebody sends me an image, I get s...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Thu Mar 24 20:12:13 EDT 2011


----------------------------------------------------------------------
Revision: e9ea8bc5cf8940fcb13b6b9e7e660580089a5bb0
Parent:   989280fb2fb829420f7ecd32ecc913d5feded7ce
Author:   tomkiewicz at o2.pl
Date:     03/24/11 17:04:23
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e9ea8bc5cf8940fcb13b6b9e7e660580089a5bb0

Changelog: 

When somebody sends me an image, I get some (depends on image size) empty
messages. It's about one empty message for every 2kB of image.

Steps to reproduce:
  1. install and run AQQ on Windows (or any other gadu-gadu client with image
     sending support), login with one gg account
  2. run Pidgin 2.7.11 under linux (maybe on Windows too), login with another gg
     account
  3. send ~50kB image from AQQ to Pidgin
  4. you should get 20-30 received empty messages in Pidgin and one with image
     after it

I fixed it by checking if gg message is empty and - if true - drops the message
and print warning in debug window.

Fixes #13554.

Changes against parent 989280fb2fb829420f7ecd32ecc913d5feded7ce

  patched  libpurple/protocols/gg/gg.c

-------------- next part --------------
============================================================
--- libpurple/protocols/gg/gg.c	f9645a358190f517bd28e07af3eaf59b22f7cb9f
+++ libpurple/protocols/gg/gg.c	95a68cb4aa97b3b2cd555046593941e161275277
@@ -1417,6 +1417,12 @@ static void ggp_recv_message_handler(Pur
 	gchar *msg;
 	gchar *tmp;
 
+	if (ev->event.msg.message == NULL)
+	{
+		purple_debug_warning("gg", "ggp_recv_message_handler: NULL as message pointer\n");
+		return;
+	}
+
 	from = g_strdup_printf("%lu", (unsigned long int)ev->event.msg.sender);
 
 	/*


More information about the Commits mailing list