Commit f94f4c16 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

when event_add or event_del fail, tell us why.

(nick, do i have my libevent strerror dance moves correct?)


svn:r5462
parent 97f748f6
......@@ -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. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment