[PVFS2-CVS] commit by pcarns in pvfs2/src/io/bmi/bmi_tcp: socket-collection.c

CVS commit program cvs at parl.clemson.edu
Tue Mar 2 17:57:37 EST 2004


Update of /projects/cvsroot/pvfs2/src/io/bmi/bmi_tcp
In directory parlweb:/tmp/cvs-serv19492

Modified Files:
	socket-collection.c 
Log Message:
temporary work around to a sticky problem


Index: socket-collection.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_tcp/socket-collection.c,v
diff -p -u -r1.11 -r1.12
--- socket-collection.c	2 Mar 2004 19:28:22 -0000	1.11
+++ socket-collection.c	2 Mar 2004 22:57:37 -0000	1.12
@@ -284,23 +284,24 @@ int BMI_socket_collection_testglobal(soc
 	tcp_data = tmp_map->method_data;
 	if (tcp_data->socket < 0)
 	{
-	    gossip_lerr("Error: found bad socket in socket collection.\n");
-	    gossip_lerr("Error: not handle properly....\n");
-	    /* TODO: handle this better */
-	    gen_mutex_unlock(external_mutex);
-	    gen_mutex_unlock(&big_poll_mutex);
-	    gen_mutex_lock(external_mutex);
-	    return (-EINVAL);
+	    /* TODO: not sure how we hit this case, but it is definitely
+	     * happening.  For now just ignore and keep going, fix better
+	     * later
+	     */
+	    qlist_add_tail(&(tcp_data->sc_link), scp);
 	}
-	big_poll_fds[num_to_poll].fd = tcp_data->socket;
-	if (tcp_data->write_ref_count > 0)
+	else
 	{
-	    big_poll_fds[num_to_poll].events += POLLOUT;
+	    big_poll_fds[num_to_poll].fd = tcp_data->socket;
+	    if (tcp_data->write_ref_count > 0)
+	    {
+		big_poll_fds[num_to_poll].events += POLLOUT;
+	    }
+	    big_poll_fds[num_to_poll].events += POLLIN;
+	    big_poll_addr[num_to_poll] = tmp_map;
+	    num_to_poll++;
+	    qlist_add_tail(&(tcp_data->sc_link), scp);
 	}
-	big_poll_fds[num_to_poll].events += POLLIN;
-	big_poll_addr[num_to_poll] = tmp_map;
-	num_to_poll++;
-	qlist_add_tail(&(tcp_data->sc_link), scp);
     }
 
     /* we should be all set now to perform the poll operation */



More information about the PVFS2-CVS mailing list