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.