From: Eduardo <ep...@us...> - 2006-09-26 14:54:36
|
On 2006-09-26 11:22:18 UTC, Evan Schoenberg wrote: > I was working on fixing Yahoo profile/icon lookups to be cancellable, > to prevent crashes after a disconnection like: > Thread 0 Crashed: > 0 Libgaim 0x0798992d > yahoo_buddy_icon_upload_connected 97 (yahoo_picture.c:455) > 1 Libgaim 0x07904731 > gaim_proxy_connect_data_connected 32 (proxy.c:383) > 2 Libgaim 0x079047d5 socket_ready_cb 118 > (proxy.c:425) > 3 com.apple.CoreFoundation 0x908393f3 __CFSocketDoCallback > 551 > > Since there can be any number of such requests going (I believe), my > plan was to have a GSList of GaimProxyConnectData structs associated > with the prpl's connection-specific data (yahoo_data struct). > However, I can't see how to remove the right GaimProxyConnectData > from the list when the connect is successful (immediately after which > it will be free()'d by proxy.c). Should the connect callback receive > the GaimProxyConnectData back as a parameter to use if necessary, or > am I missing something? It looks like code elsewhere has a 1:1 > relationship between some object (e.g. a directconn in the msn prpl) > and its GaimProxyConnectData. I think using a GSList of GaimProxyConnectData is a bad idea. I do not see why you need to keep a list of GaimProxyConnectData. Could you describe the problem (crash)? I was looking the other day to this web page: http://www.artima.com/weblogs/viewpost.jsp?thread=168511 and saw this inside yahoo_buddy_icon_upload_connected(): if (!d) return; That seems like bad code. |