comparison libpurple/protocols/yahoo/libymsg.c @ 27422:d46ab8c52cc4

Fix two errors when my p2p server connection times out. (08:49:31) yahoo: yahoo p2p server timeout, peer failed to connect(08:49:31) GLib: g_source_remove: assertion `tag > 0' failed
author Paul Aurich <paul@darkrain42.org>
date Wed, 08 Jul 2009 16:51:14 +0000
parents 09772222714a
children d4cfd179203b
comparison
equal deleted inserted replaced
27421:1ce607bc4dce 27422:d46ab8c52cc4
2237 if (f) 2237 if (f)
2238 yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_NOT_CONNECTED); 2238 yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_NOT_CONNECTED);
2239 2239
2240 if(p2p_data->source >= 0) 2240 if(p2p_data->source >= 0)
2241 close(p2p_data->source); 2241 close(p2p_data->source);
2242 purple_input_remove(p2p_data->input_event); 2242 if (p2p_data->input_event > 0)
2243 purple_input_remove(p2p_data->input_event);
2243 g_free(p2p_data->host_ip); 2244 g_free(p2p_data->host_ip);
2244 g_free(p2p_data->host_username); 2245 g_free(p2p_data->host_username);
2245 g_free(p2p_data); 2246 g_free(p2p_data);
2246 } 2247 }
2247 2248
2457 if(!(p2p_data = data)) 2458 if(!(p2p_data = data))
2458 return FALSE; 2459 return FALSE;
2459 2460
2460 yd = p2p_data->gc->proto_data; 2461 yd = p2p_data->gc->proto_data;
2461 2462
2462 purple_debug_warning("yahoo","yahoo p2p server timeout, peer failed to connect"); 2463 purple_debug_warning("yahoo","yahoo p2p server timeout, peer failed to connect\n");
2463 yahoo_p2p_disconnect_destroy_data(data); 2464 yahoo_p2p_disconnect_destroy_data(data);
2464 purple_input_remove(yd->yahoo_p2p_server_watcher); 2465 purple_input_remove(yd->yahoo_p2p_server_watcher);
2465 yd->yahoo_p2p_server_watcher = 0; 2466 yd->yahoo_p2p_server_watcher = 0;
2466 close(yd->yahoo_local_p2p_server_fd); 2467 close(yd->yahoo_local_p2p_server_fd);
2467 yd->yahoo_local_p2p_server_fd = -1; 2468 yd->yahoo_local_p2p_server_fd = -1;