From c14fa3c3a9b566cb899fcd19bb0a028815d3c803 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Tue, 24 Mar 2009 22:06:26 +0100 Subject: [PATCH] Added more debugging info for mainloop bug #16 - In addition to small fixes to it. Signed-off-by: Jan Vidar Krey --- src/hub.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hub.c b/src/hub.c index 19b7c45..ab3f317 100644 --- a/src/hub.c +++ b/src/hub.c @@ -1016,17 +1016,20 @@ size_t hub_get_min_hubs_op(struct hub_info* hub) void hub_event_loop(struct hub_info* hub) { -#if 0 - event_dispatch(); -#endif int ret; do { ret = event_base_loop(hub->evbase, EVLOOP_ONCE); + if (ret != 0) + { + hub_log(log_debug, "event_base_loop returned: %d", (int) ret); + } + + if (ret < 0) break; event_queue_process(hub->queue); } - while (hub->status == hub_status_running); + while (hub->status == hub_status_running || hub->status == hub_status_disabled); }