Mercurial > pidgin
view libpurple/protocols/zephyr/zephyr_err.c @ 29685:6797736dbe37
Does anyone know the purpose of the ui_write, ui_read and data_not_sent
FT UI callbacks? It looks like they allow a UI to decide how to safe
incoming file transfers? They're not used in Pidgin or Finch. Are
they used elsewhere?
Valgrind is complaining about an invalid free. I think it happens either
when the local user cancels a file transfer or when the remote user
cancels a file transfer. I think this change fixes it.
Revision fa4ce539e5025eb07aad3ca824cd4c512010d8a8 is related to these
callbacks and to this change by foufou33@ gee male dot com
The valgrind error is:
==23064== Invalid free() / delete / delete[]
==23064== at 0x4C24D68: free (vg_replace_malloc.c:325)
==23064== by 0x9293209: g_array_free (in /lib/libglib-2.0.so.0.2200.3)
==23064== by 0x95B1995: purple_xfer_priv_data_destroy (ft.c:71)
==23064== by 0x92AA5D1: ??? (in /lib/libglib-2.0.so.0.2200.3)
==23064== by 0x92AAE17: g_hash_table_remove_all (in /lib/libglib-2.0.so.0.2200.3)
==23064== by 0x92AAFC4: g_hash_table_destroy (in /lib/libglib-2.0.so.0.2200.3)
==23064== by 0x95B579C: purple_xfers_uninit (ft.c:1642)
==23064== by 0x95ACF08: purple_core_quit (core.c:238)
==23064== by 0x43EB3E: gtk_blist_delete_cb (gtkblist.c:227)
==23064== by 0x6F9A727: ??? (in /usr/lib/libgtk-x11-2.0.so.0.1800.3)
==23064== Address 0x2355f0e0 is not stack'd, malloc'd or (recently) free'd
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 06 Apr 2010 09:52:27 +0000 |
parents | 5fe8042783c1 |
children |
line wrap: on
line source
#include "zephyr_err.h" #ifdef __STDC__ #define NOARGS void #else #define NOARGS #define const #endif static const char * const text[] = { "Packet too long or buffer too small", "Notice header too large", "Illegal value in notice", "Can't get host manager port", "Can't assign port", "Bad packet format", "Incompatible version numbers", "No port opened", "No notices match criteria", "Input queue too long", "Hostmanager not responding", "Internal error", "No previous call to ZLocateUser", "No more locations available", "Field too long for buffer", "Improperly formatted field", "SERVNAK received", "Server could not verify authentication", "Not logged-in", "No previous call to ZRetrieveSubscriptions", "No more subscriptions available", "Too many subscriptions to transmit", "End of file detected during read", 0 }; struct error_table { char const * const * msgs; long base; int n_msgs; }; struct et_list { struct et_list *next; const struct error_table * table; }; extern struct et_list *_et_list; static const struct error_table et = { text, -772103680L, 23 }; static struct et_list link = { 0, 0 }; void initialize_zeph_error_table (NOARGS) { if (!link.table) { link.next = _et_list; link.table = &et; _et_list = &link; } }