summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/control.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-03 14:06:36 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-03 14:06:36 +0000
commit9a036d216a1cf77b21b0610eeff34251279dbafa (patch)
treef5f90f063bfb98fd964ce485e6b57238e9507266 /usr.sbin/bgpd/control.c
parent6f7ff937aa150621fcaa178405ebd86a0a33bda6 (diff)
change imsg_read semantics so that the number of bytes read is returned.
that means that the callers can (and must) coope with closed connections themselves, what is exactly the desired behaviour.
Diffstat (limited to 'usr.sbin/bgpd/control.c')
-rw-r--r--usr.sbin/bgpd/control.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c
index 8dba7cffb4f..c201b20dc3c 100644
--- a/usr.sbin/bgpd/control.c
+++ b/usr.sbin/bgpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.5 2004/01/03 13:54:27 henning Exp $ */
+/* $OpenBSD: control.c,v 1.6 2004/01/03 14:06:35 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -179,7 +179,7 @@ control_dispatch_msg(struct pollfd *pfd, int i)
return (0);
}
- if (imsg_read(&c->ibuf) == -1) {
+ if (imsg_read(&c->ibuf) <= 0) {
control_close(pfd->fd);
return (1);
}