changeset 26231:775752f3e0db

dont initiate p2p connection with a peer, while we are waiting for another peer to conenct to us
author Sulabh Mahajan <sulabh@soc.pidgin.im>
date Sat, 27 Sep 2008 15:30:10 +0000
parents 7446f0597150
children 47a1a94b479b
files libpurple/protocols/yahoo/yahoo.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;