Mercurial > pidgin
comparison libpurple/protocols/jabber/data.c @ 24061:fba7c73c8f02
Fixed a memory error, which was due to me destroying some hashtables in the
wrong place...
Removed the inclusion of data packets of size < 1024 directly in <message/>
stanzas. The reason for this is there could be a lot of small smileys in one
message. Thus hitting stanza limits. So rather than trying to keep track of
the overall size, I let the receiver always request data it hasn't cached.
Put back creation of the PurpleConversation when sening a message if
purple_find_conversation_with_account returns NULL. This is needed for
purple_conv_custom_smiley_add
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Mon, 08 Sep 2008 20:48:16 +0000 |
parents | 0952f73a452c |
children | 2c6c9d72f54f |
comparison
equal
deleted
inserted
replaced
24060:0952f73a452c | 24061:fba7c73c8f02 |
---|---|
158 } | 158 } |
159 | 159 |
160 const JabberData * | 160 const JabberData * |
161 jabber_data_find_local_by_alt(const gchar *alt) | 161 jabber_data_find_local_by_alt(const gchar *alt) |
162 { | 162 { |
163 purple_debug_info("jabber", "looking up local smiley with alt = %s\n", alt); | |
163 return g_hash_table_lookup(local_data_by_alt, alt); | 164 return g_hash_table_lookup(local_data_by_alt, alt); |
164 } | 165 } |
165 | 166 |
166 const JabberData * | 167 const JabberData * |
167 jabber_data_find_local_by_cid(const gchar *cid) | 168 jabber_data_find_local_by_cid(const gchar *cid) |
168 { | 169 { |
170 purple_debug_info("jabber", "lookup local smiley with cid = %s\n", cid); | |
169 return g_hash_table_lookup(local_data_by_cid, cid); | 171 return g_hash_table_lookup(local_data_by_cid, cid); |
170 } | 172 } |
171 | 173 |
172 const JabberData * | 174 const JabberData * |
173 jabber_data_find_remote_by_cid(const gchar *cid) | 175 jabber_data_find_remote_by_cid(const gchar *cid) |
174 { | 176 { |
177 purple_debug_info("jabber", "lookup remote smiley with cid = %s\n", cid); | |
178 | |
175 return g_hash_table_lookup(remote_data_by_cid, cid); | 179 return g_hash_table_lookup(remote_data_by_cid, cid); |
176 } | 180 } |
177 | 181 |
178 void | 182 void |
179 jabber_data_associate_local(JabberData *data, const gchar *alt) | 183 jabber_data_associate_local(JabberData *data, const gchar *alt) |
180 { | 184 { |
185 purple_debug_info("jabber", "associating local smiley\n alt = %s, cid = %s\n", | |
186 alt, jabber_data_get_cid(data)); | |
181 g_hash_table_insert(local_data_by_alt, g_strdup(alt), data); | 187 g_hash_table_insert(local_data_by_alt, g_strdup(alt), data); |
182 g_hash_table_insert(local_data_by_cid, g_strdup(jabber_data_get_cid(data)), | 188 g_hash_table_insert(local_data_by_cid, g_strdup(jabber_data_get_cid(data)), |
183 data); | 189 data); |
184 } | 190 } |
185 | 191 |
186 void | 192 void |
187 jabber_data_associate_remote(JabberData *data) | 193 jabber_data_associate_remote(JabberData *data) |
188 { | 194 { |
195 purple_debug_info("jabber", "associating remote smiley, cid = %s\n", | |
196 jabber_data_get_cid(data)); | |
189 g_hash_table_insert(remote_data_by_cid, g_strdup(jabber_data_get_cid(data)), | 197 g_hash_table_insert(remote_data_by_cid, g_strdup(jabber_data_get_cid(data)), |
190 data); | 198 data); |
191 } | 199 } |
192 | 200 |
193 void | 201 void |