[mpich2-commits] r7813 - mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp

buntinas at mcs.anl.gov buntinas at mcs.anl.gov
Mon Jan 24 11:11:38 CST 2011


Author: buntinas
Date: 2011-01-24 11:11:38 -0600 (Mon, 24 Jan 2011)
New Revision: 7813

Modified:
   mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/tcp_utility.c
Log:
Fix the tcp_set_sockopts() function where we weren't actually reading the return code of the setsockopt() syscalls.

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/tcp_utility.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/tcp_utility.c	2011-01-24 15:56:18 UTC (rev 7812)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/tcp_utility.c	2011-01-24 17:11:38 UTC (rev 7813)
@@ -81,13 +81,13 @@
 
     option = 128*1024;
     len = sizeof(int);
-    setsockopt (fd, SOL_SOCKET, SO_RCVBUF, &option, len);
+    ret = setsockopt (fd, SOL_SOCKET, SO_RCVBUF, &option, len);
     MPIU_ERR_CHKANDJUMP2 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIU_Strerror (errno), errno);
-    getsockopt (fd, SOL_SOCKET, SO_RCVBUF, &option, &len);
+    ret = getsockopt (fd, SOL_SOCKET, SO_RCVBUF, &option, &len);
     MPIU_ERR_CHKANDJUMP2 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIU_Strerror (errno), errno);
-    setsockopt (fd, SOL_SOCKET, SO_SNDBUF, &option, len);
+    ret = setsockopt (fd, SOL_SOCKET, SO_SNDBUF, &option, len);
     MPIU_ERR_CHKANDJUMP2 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIU_Strerror (errno), errno);
-    getsockopt (fd, SOL_SOCKET, SO_SNDBUF, &option, &len);
+    ret = getsockopt (fd, SOL_SOCKET, SO_SNDBUF, &option, &len);
     MPIU_ERR_CHKANDJUMP2 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIU_Strerror (errno), errno);
     
     flags = fcntl(fd, F_GETFL, 0);



More information about the mpich2-commits mailing list