diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-06-26 10:28:13 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-06-26 10:28:13 +0000 |
commit | 6fa9b443073a1e992172554b63dfbfeed096debb (patch) | |
tree | d46a18c9e9384328bee7ec56207c6887a9c264b0 /usr.sbin/ldapd | |
parent | d196d42b33908899df8daa4e7e12a1fb59ebcbbd (diff) |
Improve the conn_err() bufferevent error callback. To better report errors.
OK kn@
Diffstat (limited to 'usr.sbin/ldapd')
-rw-r--r-- | usr.sbin/ldapd/conn.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ldapd/conn.c b/usr.sbin/ldapd/conn.c index f63c684e6c5..821ac336a2c 100644 --- a/usr.sbin/ldapd/conn.c +++ b/usr.sbin/ldapd/conn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conn.c,v 1.20 2023/04/30 23:49:14 jsg Exp $ */ +/* $OpenBSD: conn.c,v 1.21 2023/06/26 10:28:12 claudio Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se> @@ -242,7 +242,8 @@ conn_err(struct bufferevent *bev, short why, void *data) else if ((why & EVBUFFER_TIMEOUT) == EVBUFFER_TIMEOUT) log_debug("timeout on connection %d", conn->fd); else - log_warnx("error 0x%02X on connection %d", why, conn->fd); + log_warn("%s error on connection %d", + why & EVBUFFER_WRITE ? "write" : "read", conn->fd); conn_close(conn); } |