-/* $OpenBSD: lde.c,v 1.28 2013/11/26 11:59:38 henning Exp $ */
+/* $OpenBSD: lde.c,v 1.29 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
clock_gettime(CLOCK_MONOTONIC, &tp);
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: ldpd.c,v 1.19 2013/11/26 11:59:38 henning Exp $ */
+/* $OpenBSD: ldpd.c,v 1.20 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0)
+ shut = 1;
}
for (;;) {
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0)
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: ldpe.c,v 1.23 2013/11/26 11:59:38 henning Exp $ */
+/* $OpenBSD: ldpe.c,v 1.24 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("ldpe_dispatch_main: msgbuf_write");
+ if (n == 0)
+ shut = 1;
}
for (;;) {
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("ldpe_dispatch_lde: msgbuf_write");
+ if (n == 0)
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: ospf6d.c,v 1.24 2013/11/13 20:49:49 benno Exp $ */
+/* $OpenBSD: ospf6d.c,v 1.25 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: ospfe.c,v 1.42 2013/11/13 20:49:49 benno Exp $ */
+/* $OpenBSD: ospfe.c,v 1.43 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: rde.c,v 1.61 2013/11/13 20:49:49 benno Exp $ */
+/* $OpenBSD: rde.c,v 1.62 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
clock_gettime(CLOCK_MONOTONIC, &tp);
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: ospfd.c,v 1.80 2013/11/13 20:43:00 benno Exp $ */
+/* $OpenBSD: ospfd.c,v 1.81 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: ospfe.c,v 1.87 2013/11/13 20:43:00 benno Exp $ */
+/* $OpenBSD: ospfe.c,v 1.88 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: rde.c,v 1.95 2013/11/13 20:43:00 benno Exp $ */
+/* $OpenBSD: rde.c,v 1.96 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
clock_gettime(CLOCK_MONOTONIC, &tp);
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: rde.c,v 1.16 2013/11/19 22:25:32 benno Exp $ */
+/* $OpenBSD: rde.c,v 1.17 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: ripd.c,v 1.22 2013/11/19 22:25:32 benno Exp $ */
+/* $OpenBSD: ripd.c,v 1.23 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
-/* $OpenBSD: ripe.c,v 1.15 2013/11/26 12:00:19 henning Exp $ */
+/* $OpenBSD: ripe.c,v 1.16 2014/07/12 20:16:38 krw Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
+ if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
+ if (n == 0) /* connection closed */
+ shut = 1;
}
for (;;) {