diff options
author | Michael Adam <obnox@samba.org> | 2014-09-29 11:06:32 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-09-30 16:36:09 +0200 |
commit | 9ddb66128134f9d8386a6db776dc226c6a3b14ac (patch) | |
tree | b8b81c58f6b837ff1c24370b58e95ea6db2ffbd1 | |
parent | 9fa673bf37d59b14b113df978da58be4e3e58d7d (diff) | |
download | samba-9ddb66128134f9d8386a6db776dc226c6a3b14ac.tar.gz |
s3:unix_msg: remember errno in unix_dgram_send_job in case of send error.
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | source3/lib/unix_msg/unix_msg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c index c3bcb56b192..e6e7e020ee2 100644 --- a/source3/lib/unix_msg/unix_msg.c +++ b/source3/lib/unix_msg/unix_msg.c @@ -579,6 +579,10 @@ static void unix_dgram_send_job(void *private_data) do { dmsg->sent = sendmsg(dmsg->sock, &msg, 0); } while ((dmsg->sent == -1) && (errno == EINTR)); + + if (dmsg->sent == -1) { + dmsg->sys_errno = errno; + } } static void unix_dgram_job_finished(struct poll_watch *w, int fd, short events, |