summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/buffer.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-08-11 16:26:30 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-08-11 16:26:30 +0000
commit5296538c085bc25e287b1ceeb113fd88e83ade00 (patch)
tree3ad1d9c6a6f646bd97792a8275f6947f0c4f03a7 /usr.sbin/ntpd/buffer.c
parent1a1870f1d40fae0b5b4a851eb3fde752023b71e2 (diff)
on writing, we actually can deal with ENOBUFS just as well as with EAGAIN
and EINTR, so do it, more or less from bgpd
Diffstat (limited to 'usr.sbin/ntpd/buffer.c')
-rw-r--r--usr.sbin/ntpd/buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/buffer.c b/usr.sbin/ntpd/buffer.c
index 173bad3b325..63607fe7bfd 100644
--- a/usr.sbin/ntpd/buffer.c
+++ b/usr.sbin/ntpd/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.8 2005/08/11 16:21:52 henning Exp $ */
+/* $OpenBSD: buffer.c,v 1.9 2005/08/11 16:26:29 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -107,7 +107,8 @@ msgbuf_write(struct msgbuf *msgbuf)
}
if ((n = writev(msgbuf->fd, iov, i)) == -1) {
- if (errno == EAGAIN || errno == EINTR) /* try again later */
+ if (errno == EAGAIN || errno == EINTR ||
+ errno == ENOBUFS) /* try again later */
return (0);
else
return (-1);