src/protocols/oscar/peer.c

changeset 13665
c8984bccd64c
parent 13609
a6fbfad454b6
child 13666
3fd8677daf94
--- a/src/protocols/oscar/peer.c	Wed Apr 19 05:50:50 2006 +0000
+++ b/src/protocols/oscar/peer.c	Thu Apr 20 04:45:06 2006 +0000
@@ -516,14 +516,12 @@
 	PeerConnection *conn;
 	OscarData *od;
 	GaimConnection *gc;
-	GaimAccount *account;
 	struct sockaddr addr;
 	socklen_t addrlen = sizeof(addr);
 
 	conn = data;
 	od = conn->od;
 	gc = od->gc;
-	account = gaim_connection_get_account(gc);
 
 	gaim_debug_info("oscar", "Accepting connection on listener socket.\n");
 
@@ -595,6 +593,13 @@
 
 	/* Send the "please connect to me!" ICBM */
 	bos_conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM);
+	if (bos_conn == NULL)
+	{
+		/* Not good */
+		peer_connection_trynext(conn);
+		return;
+	}
+
 	listener_ip = gaim_network_get_my_ip(bos_conn->fd);
 	listener_port = gaim_network_get_port_from_fd(conn->listenerfd);
 	if (conn->type == OSCAR_CAPABILITY_DIRECTIM)
@@ -774,9 +779,6 @@
 peer_connection_propose(OscarData *od, OscarCapability type, const char *sn)
 {
 	PeerConnection *conn;
-	GaimAccount *account;
-
-	account = gaim_connection_get_account(od->gc);
 
 	if (type == OSCAR_CAPABILITY_DIRECTIM)
 	{
@@ -785,6 +787,7 @@
 		{
 			if (conn->ready)
 			{
+				GaimAccount *account;
 				GaimConversation *conv;
 
 				gaim_debug_info("oscar", "Already have a direct IM "

mercurial