diff libpurple/protocols/oscar/peer.c @ 19686:b199a9be3e95

Start watching the listener socket immediately after it's created instead of waiting until we receive confirmation from the other side that they've established a TCP connection to us. This fixes a bug where sending a file from Trillian to Pidgin would fail if the Trillian user was behind a firewall. Fixes #2976. Huge thanks to Kyryll A Mirnenko aka Mirya for basically tracking this down.
author Mark Doliner <mark@kingant.net>
date Sun, 09 Sep 2007 07:52:44 +0000
parents 44b4e8bd759b
children 6a0d9fa477d4 04fe5601fedb
line wrap: on
line diff
--- a/libpurple/protocols/oscar/peer.c	Sun Sep 09 05:56:56 2007 +0000
+++ b/libpurple/protocols/oscar/peer.c	Sun Sep 09 07:52:44 2007 +0000
@@ -671,6 +671,10 @@
 	account = purple_connection_get_account(gc);
 	conn->listenerfd = listenerfd;
 
+	/* Watch for new connections on our listener socket */
+	conn->watcher_incoming = purple_input_add(conn->listenerfd,
+			PURPLE_INPUT_READ, peer_connection_listen_cb, conn);
+
 	/* Send the "please connect to me!" ICBM */
 	bos_conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM);
 	if (bos_conn == NULL)