comparison libpurple/protocols/yahoo/yahoo.c @ 26143:8f28023d3d6d

Dont try a p2p connection to non yahoo buddies
author Sulabh Mahajan <sulabh@soc.pidgin.im>
date Wed, 20 Aug 2008 21:17:04 +0000
parents 3b19ea3c8165
children 0dd4629e75ee
comparison
equal deleted inserted replaced
26142:3b19ea3c8165 26143:8f28023d3d6d
2638 f = yahoo_friend_find(gc, who); 2638 f = yahoo_friend_find(gc, who);
2639 account = purple_connection_get_account(gc); 2639 account = purple_connection_get_account(gc);
2640 2640
2641 /* One shouldn't try to connect to self */ 2641 /* One shouldn't try to connect to self */
2642 if( strcmp(purple_normalize(account, purple_account_get_username(account)), who) == 0) 2642 if( strcmp(purple_normalize(account, purple_account_get_username(account)), who) == 0)
2643 return;
2644
2645 /* Dont send p2p packet to buddies of other protocols */
2646 if(f->protocol)
2643 return; 2647 return;
2644 2648
2645 /* 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 */ 2649 /* 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 */
2646 if( !( f && (yahoo_friend_get_p2p_status(f) == YAHOO_P2PSTATUS_NOT_CONNECTED) && (f->p2p_packet_sent == 0)) ) 2650 if( !( f && (yahoo_friend_get_p2p_status(f) == YAHOO_P2PSTATUS_NOT_CONNECTED) && (f->p2p_packet_sent == 0)) )
2647 return; 2651 return;