diff --git a/src/core/hub.c b/src/core/hub.c index 2ebce5b..84119b7 100644 --- a/src/core/hub.c +++ b/src/core/hub.c @@ -543,7 +543,6 @@ struct hub_info* hub_start_service(struct hub_config* config) } event_set(&hub->ev_accept, hub->fd_tcp, EV_READ | EV_PERSIST, net_on_accept, hub); - event_base_set(net_get_evbase(), &hub->ev_accept); if (event_add(&hub->ev_accept, NULL) == -1) { uman_shutdown(hub); diff --git a/src/core/main.c b/src/core/main.c index 1687246..b85f229 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -81,7 +81,6 @@ void setup_signal_handlers(struct hub_info* hub) for (i = 0; signals[i]; i++) { signal_set(&signal_events[i], signals[i], hub_handle_signal, hub); - event_base_set(net_get_evbase(), &signal_events[i]); if (signal_add(&signal_events[i], NULL)) { LOG_ERROR("Error setting signal handler %d", signals[i]); diff --git a/src/core/usermanager.c b/src/core/usermanager.c index 2d18c8f..2c7bf75 100644 --- a/src/core/usermanager.c +++ b/src/core/usermanager.c @@ -77,7 +77,6 @@ static void timer_statistics(int fd, short ev, void *arg) struct timeval timeout = { TIMEOUT_STATS, 0 }; uman_update_stats(hub); evtimer_set(&hub->ev_timer, timer_statistics, hub); - event_base_set(net_get_evbase(), &hub->ev_timer); evtimer_add(&hub->ev_timer, &timeout); } #endif @@ -111,7 +110,6 @@ int uman_init(struct hub_info* hub) if (net_get_evbase()) { evtimer_set(&hub->ev_timer, timer_statistics, hub); - event_base_set(net_get_evbase(), &hub->ev_timer); evtimer_add(&hub->ev_timer, &timeout); } #endif // 0 diff --git a/src/network/connection.c b/src/network/connection.c index b1eb28d..28ad2ee 100644 --- a/src/network/connection.c +++ b/src/network/connection.c @@ -107,7 +107,6 @@ void net_con_initialize(struct net_connection* con, int sd, struct ip_addr_encap if (events & EV_WRITE) net_con_flag_set(con, NET_WANT_WRITE); event_set(&con->event, con->sd, events | EV_PERSIST, net_con_event, con); - event_base_set(net_get_evbase(), &con->event); event_add(&con->event, 0); net_set_nonblocking(sd, 1); @@ -294,7 +293,6 @@ void net_con_set_timeout(struct net_connection* con, int seconds) { struct timeval timeout = { seconds, 0 }; evtimer_set(&con->timeout, net_con_event, con); - event_base_set(net_get_evbase(), &con->timeout); evtimer_add(&con->timeout, &timeout); }