diff options
Diffstat (limited to 'pathd/path_ted.c')
| -rw-r--r-- | pathd/path_ted.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/pathd/path_ted.c b/pathd/path_ted.c index bc0da969e3..d8ddd8cdc8 100644 --- a/pathd/path_ted.c +++ b/pathd/path_ted.c @@ -28,8 +28,8 @@ static void path_ted_unregister_vty(void); static uint32_t path_ted_start_importing_igp(const char *daemon_str); static uint32_t path_ted_stop_importing_igp(void); static enum zclient_send_status path_ted_link_state_sync(void); -static void path_ted_timer_handler_sync(struct thread *thread); -static void path_ted_timer_handler_refresh(struct thread *thread); +static void path_ted_timer_handler_sync(struct event *thread); +static void path_ted_timer_handler_refresh(struct event *thread); static int path_ted_cli_debug_config_write(struct vty *vty); static int path_ted_cli_debug_set_all(uint32_t flags, bool set); @@ -41,7 +41,7 @@ struct ted_state ted_state_g = {}; * path_path_ted public API function implementations */ -void path_ted_init(struct thread_master *master) +void path_ted_init(struct event_loop *master) { ted_state_g.main = master; ted_state_g.link_state_delay_interval = TIMER_RETRY_DELAY; @@ -583,9 +583,9 @@ enum zclient_send_status path_ted_link_state_sync(void) PATH_TED_DEBUG("%s: PATHD-TED: Opaque asked for TED sync ", __func__); } - thread_add_timer(ted_state_g.main, path_ted_timer_handler_sync, - &ted_state_g, ted_state_g.link_state_delay_interval, - &ted_state_g.t_link_state_sync); + event_add_timer(ted_state_g.main, path_ted_timer_handler_sync, + &ted_state_g, ted_state_g.link_state_delay_interval, + &ted_state_g.t_link_state_sync); return status; } @@ -597,10 +597,10 @@ enum zclient_send_status path_ted_link_state_sync(void) * * @return status */ -void path_ted_timer_handler_sync(struct thread *thread) +void path_ted_timer_handler_sync(struct event *thread) { /* data unpacking */ - struct ted_state *data = THREAD_ARG(thread); + struct ted_state *data = EVENT_ARG(thread); assert(data != NULL); /* Retry the sync */ @@ -619,10 +619,9 @@ int path_ted_segment_list_refresh(void) int status = 0; path_ted_timer_refresh_cancel(); - thread_add_timer(ted_state_g.main, path_ted_timer_handler_refresh, - &ted_state_g, - ted_state_g.segment_list_refresh_interval, - &ted_state_g.t_segment_list_refresh); + event_add_timer(ted_state_g.main, path_ted_timer_handler_refresh, + &ted_state_g, ted_state_g.segment_list_refresh_interval, + &ted_state_g.t_segment_list_refresh); return status; } @@ -634,14 +633,14 @@ int path_ted_segment_list_refresh(void) * * @return status */ -void path_ted_timer_handler_refresh(struct thread *thread) +void path_ted_timer_handler_refresh(struct event *thread) { if (!path_ted_is_initialized()) return; PATH_TED_DEBUG("%s: PATHD-TED: Refresh sid from current TED", __func__); /* data unpacking */ - struct ted_state *data = THREAD_ARG(thread); + struct ted_state *data = EVENT_ARG(thread); assert(data != NULL); @@ -658,7 +657,7 @@ void path_ted_timer_handler_refresh(struct thread *thread) void path_ted_timer_sync_cancel(void) { if (ted_state_g.t_link_state_sync != NULL) { - thread_cancel(&ted_state_g.t_link_state_sync); + event_cancel(&ted_state_g.t_link_state_sync); ted_state_g.t_link_state_sync = NULL; } } @@ -673,7 +672,7 @@ void path_ted_timer_sync_cancel(void) void path_ted_timer_refresh_cancel(void) { if (ted_state_g.t_segment_list_refresh != NULL) { - thread_cancel(&ted_state_g.t_segment_list_refresh); + event_cancel(&ted_state_g.t_segment_list_refresh); ted_state_g.t_segment_list_refresh = NULL; } } |
