diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-11-27 21:41:31 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-11-27 21:41:31 +0000 |
commit | 8250637f1eb25b94bf5b72c3ef37db1b81884a17 (patch) | |
tree | 1e51e7a5fdadc6fd8edd35490d4d400e015ec79c | |
parent | d3cfaca5e3b3a623d0a4880733e4b6e0cf11afef (diff) |
Imporve error messages for the imsg handler code. OK sthen@
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index f6e19cab83a..a6270d976f5 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.182 2015/11/20 23:26:08 florian Exp $ */ +/* $OpenBSD: bgpd.c,v 1.183 2015/11/27 21:41:30 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -903,21 +903,21 @@ handle_pollfd(struct pollfd *pfd, struct imsgbuf *i) if (pfd->revents & POLLOUT) if (msgbuf_write(&i->w) <= 0 && errno != EAGAIN) { - log_warn("handle_pollfd: msgbuf_write error"); + log_warn("imsg write error"); close(i->fd); i->fd = -1; return (-1); } if (pfd->revents & POLLIN) { - if ((n = imsg_read(i)) == -1) { - log_warn("handle_pollfd: imsg_read error"); + if ((n = imsg_read(i)) == -1 && errno != EAGAIN) { + log_warn("imsg read error"); close(i->fd); i->fd = -1; return (-1); } - if (n == 0) { /* connection closed */ - log_warn("handle_pollfd: poll fd"); + if (n == 0) { + log_warnx("peer closed imsg connection"); close(i->fd); i->fd = -1; return (-1); |