diff libpurple/protocols/yahoo/yahoo_filexfer.c @ 26227:abf830f6cd43

When sending a file, if there isn't a p2p connection, try establishing it. one.
author Sulabh Mahajan <sulabh@soc.pidgin.im>
date Fri, 22 Aug 2008 15:00:16 +0000
parents 9a5da524fba9
children eb21f65728c0
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c	Wed Aug 20 21:37:09 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo_filexfer.c	Fri Aug 22 15:00:16 2008 +0000
@@ -1047,6 +1047,10 @@
 
 	g_return_if_fail(xfer != NULL);
 
+	/* if we don't have a p2p connection, try establishing it now */
+	if( !g_hash_table_lookup(yd->peers, who) )
+		yahoo_send_p2p_pkt(gc, who, 0);
+
 	xfer_data = xfer->data;
 	xfer_data->status_15 = STARTED;
 	purple_xfer_set_init_fnc(xfer, yahoo_xfer_init_15);