summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/ospfd.c
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2013-11-13 20:43:01 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2013-11-13 20:43:01 +0000
commitfb9e9cba60b5f6df07638c05a083213470d08fb2 (patch)
tree6be4c9e9a422b17f68c7dbe9020032eaa3c2b385 /usr.sbin/ospfd/ospfd.c
parent8fcf78b288ccd7b30e9d03613e3ada5f9fcf5183 (diff)
from claudio
"Let msgbuf_write return -1 with errno EAGAIN. The users then must check if this was the case and readd the event or poll again. The current handling in the imsg code is wrong for sure." ok gilles, benno
Diffstat (limited to 'usr.sbin/ospfd/ospfd.c')
-rw-r--r--usr.sbin/ospfd/ospfd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c
index 8e1e30d7bac..5a18ea2b58e 100644
--- a/usr.sbin/ospfd/ospfd.c
+++ b/usr.sbin/ospfd/ospfd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfd.c,v 1.79 2013/03/22 11:29:01 sthen Exp $ */
+/* $OpenBSD: ospfd.c,v 1.80 2013/11/13 20:43:00 benno Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -384,7 +384,7 @@ main_dispatch_ospfe(int fd, short event, void *bula)
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1)
+ if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
}
@@ -469,7 +469,7 @@ main_dispatch_rde(int fd, short event, void *bula)
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1)
+ if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
}