ctdb-common: Fix error handling when sending ARPs
authorMartin Schwenke <martin@meltin.net>
Fri, 10 Aug 2018 07:23:56 +0000 (17:23 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 30 Aug 2018 02:48:57 +0000 (04:48 +0200)
commit50a6d15256a22a8116b48b40c17c8c8620c2cd84
tree59c053e00ed3a2f3657589cc50adb5aecda2d54a
parent2ebb25dfc890923180ecb06d6e17ddb2948e7d2b
ctdb-common: Fix error handling when sending ARPs

There are numerous places in the code where errno can be lost causing
the wrong error to be printed by a caller.  Change ctdb_sys_send_arp()
to always return a useful errno on error instead of returning -1 and
sometimes having errno set correctly.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/common/system_socket.c
ctdb/server/ctdb_takeover.c