aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-11-26 09:37:00 +0000
committerRoger Dingledine <arma@torproject.org>2005-11-26 09:37:00 +0000
commitf94f4c1686417de73bcee9d652e5dacc891d478b (patch)
tree0a876b93e9a7b27dfdea59be07a9f4389d8a57d9 /src
parent97f748f680e75edf8dc6f965f0f80ef57c92a8db (diff)
downloadtor-f94f4c1686417de73bcee9d652e5dacc891d478b.tar
tor-f94f4c1686417de73bcee9d652e5dacc891d478b.tar.gz
when event_add or event_del fail, tell us why.
(nick, do i have my libevent strerror dance moves correct?) svn:r5462
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/main.c b/src/or/main.c
index b8ddc344f..42e92d92f 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -261,8 +261,9 @@ connection_watch_events(connection_t *conn, short events)
if (r<0)
warn(LD_NET,
- "Error from libevent setting read event state for %d to %swatched.",
- conn->s, (events & EV_READ)?"":"un");
+ "Error from libevent setting read event state for %d to %swatched: %s",
+ conn->s, (events & EV_READ)?"":"un",
+ tor_socket_strerror(tor_socket_errno(conn->s)));
if (events & EV_WRITE) {
r = event_add(conn->write_event, NULL);
@@ -272,8 +273,9 @@ connection_watch_events(connection_t *conn, short events)
if (r<0)
warn(LD_NET,
- "Error from libevent setting read event state for %d to %swatched.",
- conn->s, (events & EV_WRITE)?"":"un");
+ "Error from libevent setting read event state for %d to %swatched: %s",
+ conn->s, (events & EV_WRITE)?"":"un",
+ tor_socket_strerror(tor_socket_errno(conn->s)));
}
/** Return true iff <b>conn</b> is listening for read events. */