cpw.malu.ft_thumbnails: e8d97fd5: Allow the "alt" property on a Bits of Bi...

malu at pidgin.im malu at pidgin.im
Thu Jun 25 17:00:22 EDT 2009


-----------------------------------------------------------------
Revision: e8d97fd5bbdd11695df9dc44292fb47b1326ffcf
Ancestor: 1a7d573c69fd6b6c59eb00cd0fb698b8b6d76363
Author: malu at pidgin.im
Date: 2009-06-25T20:56:37
Branch: im.pidgin.cpw.malu.ft_thumbnails
URL: http://d.pidgin.im/viewmtn/revision/info/e8d97fd5bbdd11695df9dc44292fb47b1326ffcf

Modified files:
        libpurple/protocols/jabber/data.c

ChangeLog: 

Allow the "alt" property on a Bits of Binary object to be NULL (do not store
it in the alt lookup hashtable). This will allow us to create data objects
for temporary "one time" objects (such as file transfer thumbnails)

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/data.c	981ed62335a994873a3dfbf60481f8b7a72c17f8
+++ libpurple/protocols/jabber/data.c	3045f63efcb4a86c445c0bafb4df5fe6bb9d6c56
@@ -185,7 +185,8 @@ jabber_data_associate_local(JabberData *
 {
 	purple_debug_info("jabber", "associating local smiley\n alt = %s, cid = %s\n",
 		alt, jabber_data_get_cid(data));
-	g_hash_table_insert(local_data_by_alt, g_strdup(alt), data);
+	if (alt)
+		g_hash_table_insert(local_data_by_alt, g_strdup(alt), data);
 	g_hash_table_insert(local_data_by_cid, g_strdup(jabber_data_get_cid(data)),
 		data);
 }


More information about the Commits mailing list