comparison src/protocols/yahoo/yahoo.c @ 13968:6fc412e59214

[gaim-migrate @ 16525] A bunch of little things * Use GAIM_CONNECTION_IS_VALID(gc) in a lot of places where we were doing g_list_find(gaim_connections_get_all(), gc) * Get rid of a lot of places where we were doing g_list_find(gaim_connections_get_all(), gc). The handle used by the request API ensures that the ok and cancel callback functions won't be called if the gc is destroyed. However, GAIM_CONNECTION_IS_VALID(gc) is still very important for callback functions where we can't cancel the request. For example, gaim_proxy_connect() callback functions. * "Added" a function to Yahoo! that should help us notice when our buddies change their buddy icon/display picture * Some comments in a few places * Changed GAIM_CONNECTION_IS_VALID(gc) to only look through the list of "all" connections and not the list of "connecting" connections. Some time ago we changed how this was done so that the list of "all" connections now includes the "connection" connections. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 20 Jul 2006 08:11:54 +0000
parents b5ff22440a5b
children eb1a7d176149
comparison
equal deleted inserted replaced
13967:99b9b58b19dd 13968:6fc412e59214
808 } 808 }
809 809
810 if (!msg || !g_utf8_validate(msg, -1, NULL)) 810 if (!msg || !g_utf8_validate(msg, -1, NULL))
811 return; 811 return;
812 812
813 /* TODO: Does this really need to be escaped? It seems like it doesn't. */
813 escmsg = g_markup_escape_text(msg, -1); 814 escmsg = g_markup_escape_text(msg, -1);
814 815
815 prim = g_strdup_printf(_("Yahoo! system message for %s:"), 816 prim = g_strdup_printf(_("Yahoo! system message for %s:"),
816 me?me:gaim_connection_get_display_name(gc)); 817 me?me:gaim_connection_get_display_name(gc));
817 gaim_notify_info(NULL, NULL, prim, escmsg); 818 gaim_notify_info(NULL, NULL, prim, escmsg);
2130 yahoo_process_picture_checksum(gc, pkt); 2131 yahoo_process_picture_checksum(gc, pkt);
2131 break; 2132 break;
2132 case YAHOO_SERVICE_PICTURE_UPLOAD: 2133 case YAHOO_SERVICE_PICTURE_UPLOAD:
2133 yahoo_process_picture_upload(gc, pkt); 2134 yahoo_process_picture_upload(gc, pkt);
2134 break; 2135 break;
2136 case YAHOO_SERVICE_AVATAR_UPDATE:
2137 yahoo_process_avatar_update(gc, pkt);
2138 break;
2135 case YAHOO_SERVICE_AUDIBLE: 2139 case YAHOO_SERVICE_AUDIBLE:
2136 yahoo_process_audible(gc, pkt); 2140 yahoo_process_audible(gc, pkt);
2137 break; 2141 break;
2138 default: 2142 default:
2139 gaim_debug(GAIM_DEBUG_ERROR, "yahoo", 2143 gaim_debug(GAIM_DEBUG_ERROR, "yahoo",
2232 { 2236 {
2233 GaimConnection *gc = data; 2237 GaimConnection *gc = data;
2234 struct yahoo_data *yd; 2238 struct yahoo_data *yd;
2235 struct yahoo_packet *pkt; 2239 struct yahoo_packet *pkt;
2236 2240
2237 if (!g_list_find(gaim_connections_get_all(), gc)) { 2241 if (!GAIM_CONNECTION_IS_VALID(gc)) {
2238 close(source); 2242 close(source);
2239 return; 2243 return;
2240 } 2244 }
2241 2245
2242 if (source < 0) { 2246 if (source < 0) {
2259 { 2263 {
2260 GaimConnection *gc = data; 2264 GaimConnection *gc = data;
2261 struct yahoo_data *yd; 2265 struct yahoo_data *yd;
2262 struct yahoo_packet *pkt; 2266 struct yahoo_packet *pkt;
2263 2267
2264 if (!g_list_find(gaim_connections_get_all(), gc)) { 2268 if (!GAIM_CONNECTION_IS_VALID(gc)) {
2265 close(source); 2269 close(source);
2266 return; 2270 return;
2267 } 2271 }
2268 2272
2269 if (source < 0) { 2273 if (source < 0) {