rx: Save errno in pthread rxi_Sendmsg 23/14423/3
authorAndrew Deason <adeason@sinenomine.net>
Mon, 2 Nov 2020 19:16:41 +0000 (13:16 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 18 Dec 2020 16:53:57 +0000 (11:53 -0500)
commiteff7fa4b2eb9a3001dc18dca157ccbd5f19f89b6
tree69a030313c02bf331af5adda04f56aea53520414
parent2ad9190b838fd720f4788b18099cc6b6fd3a6727
rx: Save errno in pthread rxi_Sendmsg

Currently, our pthread version of rxi_Sendmsg uses 'errno' in some
logic if sendmsg fails, but we do so after calling functions that
might alter errno (e.g. fflush).

To make sure we get the correct errno value, save the value of errno
right after sendmsg returns an error. Reorganize this function a bit
to help make the logic easier to follow.

Change-Id: I6bf284bd75edb5404bb6771bb99a9381b0f8654d
Reviewed-on: https://gerrit.openafs.org/14423
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/rx/rx_pthread.c