rx: pthread sendmsg should return success, not a bytecount
authorDerrick Brashear <shadow@your-file-system.com>
Wed, 17 Oct 2012 22:52:41 +0000 (18:52 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Thu, 18 Oct 2012 07:50:34 +0000 (00:50 -0700)
thanks to Marc Dionne for noticing the error

Change-Id: I6e5d8b6e3aa30cb0722aff1a9e538f23f40de441
Reviewed-on: http://gerrit.openafs.org/8246
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/rx/rx_pthread.c

index 9dcb9f7..03ece50 100644 (file)
@@ -418,9 +418,8 @@ rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags)
     if (ret < 0) {
        while (rxi_HandleSocketError(socket) > 0)
            ;
+       return ret;
     }
-    return ret;
-
 #else
 # ifdef AFS_LINUX22_ENV
     /* linux unfortunately returns ECONNREFUSED if the target port
@@ -441,8 +440,8 @@ rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags)
 # endif
        return -1;
     }
-    return 0;
 #endif /* !AFS_RXERRQ_ENV */
+    return 0;
 }
 
 struct rx_ts_info_t * rx_ts_info_init(void) {