Use -errno or WSAGetLastError() as return value from rxi_Sendmsg()
authorAdam Megacz <megacz@hcoop.net>
Sun, 19 Jul 2009 18:00:41 +0000 (11:00 -0700)
committerDerrick Brashear <shadow@dementia.org>
Mon, 27 Jul 2009 01:00:22 +0000 (18:00 -0700)
commit119c756d96c4a7f9e01e4ff6bb20156f1abf761b
treeefdc4db0341049508681c1def1022c7345e58990
parent20687eecd09cdcf46274979d744de8708e6567b3
Use -errno or WSAGetLastError() as return value from rxi_Sendmsg()

This patch causes the pthread and lwp implementations of rxi_Sendmsg()
to use -errno or WSAGetLastError() as the return value if it is
positive.  This is required in order to communicate more meaningful
error conditions to rxi_SendPacket[List], which should "down" a host
immediately when it observes ENETUNREACH.

Jeff Altman <jaltman@openafs.org> supplied the logic for the
AFS_NT40_ENV case; I was not able to test this (I do not own a
Windows license) and took him on his word.

Reviewed-on: http://gerrit.openafs.org/58
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Adam Megacz <megacz@gmail.com>
Tested-by: Adam Megacz <megacz@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/rx/rx_lwp.c
src/rx/rx_pthread.c