[PATCH] fix local-messaging-read4 on FreeBSD
Volker Lendecke
Volker.Lendecke at SerNet.DE
Mon Nov 24 08:33:08 MST 2014
Hi!
I'd appreciate review&push.
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From fb2a290c44947d8dee846288ae6330db7587cc2d Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 24 Nov 2014 16:27:39 +0100
Subject: [PATCH 1/2] unix_msg: Reformat unix_dgram_send a bit
This makes the next commit a bit more readable
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/lib/unix_msg/unix_msg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c
index 00ac7f5..9641bff 100644
--- a/source3/lib/unix_msg/unix_msg.c
+++ b/source3/lib/unix_msg/unix_msg.c
@@ -741,7 +741,9 @@ static int unix_dgram_send(struct unix_dgram_ctx *ctx,
if (ret >= 0) {
return 0;
}
- if ((errno != EWOULDBLOCK) && (errno != EAGAIN) && (errno != EINTR)) {
+ if ((errno != EWOULDBLOCK) &&
+ (errno != EAGAIN) &&
+ (errno != EINTR)) {
return errno;
}
--
2.1.0
From c83ff9001076395404068a48caad60cf14d55fca Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 24 Nov 2014 16:31:07 +0100
Subject: [PATCH 2/2] messaging3: Fix sending large messages on FreeBSD
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/lib/unix_msg/unix_msg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c
index 9641bff..7ca506a 100644
--- a/source3/lib/unix_msg/unix_msg.c
+++ b/source3/lib/unix_msg/unix_msg.c
@@ -743,6 +743,10 @@ static int unix_dgram_send(struct unix_dgram_ctx *ctx,
}
if ((errno != EWOULDBLOCK) &&
(errno != EAGAIN) &&
+#ifdef ENOBUFS
+ /* FreeBSD can give this for large messages */
+ (errno != ENOBUFS) &&
+#endif
(errno != EINTR)) {
return errno;
}
--
2.1.0
More information about the samba-technical
mailing list