diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-07-11 16:43:34 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-07-11 16:43:34 +0000 |
commit | d86f69039af3dee1bcbb1223b4de6478cc00fd2f (patch) | |
tree | e24a1456519126fcabb1f442a4da2fccff69fb37 /usr.sbin/dvmrpd/control.c | |
parent | 35d0dfe517a0ad6ff9db41676cd757261bd10ac0 (diff) |
Close the control fd when it has reported EOF.
ok henning@
Diffstat (limited to 'usr.sbin/dvmrpd/control.c')
-rw-r--r-- | usr.sbin/dvmrpd/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dvmrpd/control.c b/usr.sbin/dvmrpd/control.c index 0bfd1e5311b..a2d3c3a7c7f 100644 --- a/usr.sbin/dvmrpd/control.c +++ b/usr.sbin/dvmrpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.18 2013/11/26 11:32:30 henning Exp $ */ +/* $OpenBSD: control.c,v 1.19 2014/07/11 16:43:33 krw Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -229,7 +229,7 @@ control_dispatch_imsg(int fd, short event, void *bula) } } if (event & EV_WRITE) { - if (msgbuf_write(&c->iev.ibuf.w) == -1 && errno != EAGAIN) { + if (msgbuf_write(&c->iev.ibuf.w) <= 0 && errno != EAGAIN) { control_close(fd); return; } |