diff options
author | Niels Provos <provos@gmail.com> | 2005-03-29 07:03:10 +0000 |
---|---|---|
committer | Niels Provos <provos@gmail.com> | 2005-03-29 07:03:10 +0000 |
commit | fbdaf3ab6229f036c0561a347f06b7f913a2b165 (patch) | |
tree | a836e38ea4ccd6b3e9cb487c12a96968beefb49e /poll.c | |
parent | 99442c6f00c16502afa517e063ff15e20c00212a (diff) | |
download | libevent-fbdaf3ab6229f036c0561a347f06b7f913a2b165.tar.gz |
debugging callbacks from Nick Mathewson <nickm@freehaven.net>
svn:r136
Diffstat (limited to 'poll.c')
-rw-r--r-- | poll.c | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -45,18 +45,11 @@ #include <string.h> #include <unistd.h> #include <errno.h> -#include <err.h> - -#ifdef USE_LOG -#include "log.h" -#else -#define LOG_DBG(x) -#define log_error(x) perror(x) -#endif #include "event.h" #include "event-internal.h" #include "evsignal.h" +#include "log.h" extern volatile sig_atomic_t evsignal_caught; @@ -132,13 +125,13 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv) pop->event_set = realloc(pop->event_set, count * sizeof(struct pollfd)); if (pop->event_set == NULL) { - log_error("realloc"); + event_warn("realloc"); return (-1); } pop->event_back = realloc(pop->event_back, count * sizeof(struct event *)); if (pop->event_back == NULL) { - log_error("realloc"); + event_warn("realloc"); return (-1); } pop->event_count = count; @@ -177,7 +170,7 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv) if (res == -1) { if (errno != EINTR) { - log_error("poll"); + event_warn("poll"); return (-1); } @@ -186,7 +179,7 @@ poll_dispatch(struct event_base *base, void *arg, struct timeval *tv) } else if (evsignal_caught) evsignal_process(); - LOG_DBG((LOG_MISC, 80, "%s: poll reports %d", __func__, res)); + event_debug(("%s: poll reports %d", __func__, res)); if (res == 0) return (0); |