# HG changeset patch # User Sulabh Mahajan # Date 1222529410 0 # Node ID 775752f3e0dbdc2448f9545dddae3342dce82d41 # Parent 7446f0597150ce4ce812da266b9eb60ad638d406 dont initiate p2p connection with a peer, while we are waiting for another peer to conenct to us diff -r 7446f0597150 -r 775752f3e0db libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Fri Aug 22 20:25:56 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sat Sep 27 15:30:10 2008 +0000 @@ -2638,6 +2638,10 @@ f = yahoo_friend_find(gc, who); account = purple_connection_get_account(gc); + /* Do not send invitation if already listening for other connection */ + if(yd->yahoo_local_p2p_server_fd) + return; + /* One shouldn't try to connect to self */ if( strcmp(purple_normalize(account, purple_account_get_username(account)), who) == 0) return;