# HG changeset patch # User Sulabh Mahajan # Date 1219433251 0 # Node ID 4e378c8b5c496ce00ed398bb791172064a8beba9 # Parent 9c633c83caa6fef29e279de995de2cd63e2542e4 Remove bug that crashed pidgin when sending p2p pkt to a buddy not on server list diff -r 9c633c83caa6 -r 4e378c8b5c49 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Fri Aug 22 18:48:03 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Fri Aug 22 19:27:31 2008 +0000 @@ -2642,14 +2642,14 @@ if( strcmp(purple_normalize(account, purple_account_get_username(account)), who) == 0) return; + /* send packet to only those friends who arent p2p connected and to whom we havent already sent. Do not send if this condition doesn't hold good */ + if( !( f && (yahoo_friend_get_p2p_status(f) == YAHOO_P2PSTATUS_NOT_CONNECTED) && (f->p2p_packet_sent == 0)) ) + return; + /* Dont send p2p packet to buddies of other protocols */ if(f->protocol) return; - /* send packet to only those friends who arent p2p connected and to whom we havent already sent. Do not send if this condition doesn't hold good */ - if( !( f && (yahoo_friend_get_p2p_status(f) == YAHOO_P2PSTATUS_NOT_CONNECTED) && (f->p2p_packet_sent == 0)) ) - return; - public_ip = purple_network_get_public_ip(); if( (sscanf(public_ip, "%u.%u.%u.%u", &temp[0], &temp[1], &temp[2], &temp[3])) !=4 ) return ;