diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-07-17 17:09:51 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2020-10-23 12:16:52 -0400 |
| commit | 5047884528ec263215504cb5df12ebd2422cc392 (patch) | |
| tree | 952121f1a904ef9c86c1f7336a3aae757eeb3434 /ldpd/interface.c | |
| parent | b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 (diff) | |
*: unify thread/event cancel macros
Replace all lib/thread cancel macros, use thread_cancel()
everywhere. Only the THREAD_OFF macro and thread_cancel() api are
supported. Also adjust thread_cancel_async() to NULL caller's pointer (if
present).
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'ldpd/interface.c')
| -rw-r--r-- | ldpd/interface.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ldpd/interface.c b/ldpd/interface.c index 8b3dd71fd7..3e9f2fa991 100644 --- a/ldpd/interface.c +++ b/ldpd/interface.c @@ -470,7 +470,7 @@ if_hello_timer(struct thread *thread) static void if_start_hello_timer(struct iface_af *ia) { - THREAD_TIMER_OFF(ia->hello_timer); + thread_cancel(&ia->hello_timer); ia->hello_timer = NULL; thread_add_timer(master, if_hello_timer, ia, if_get_hello_interval(ia), &ia->hello_timer); @@ -479,7 +479,7 @@ if_start_hello_timer(struct iface_af *ia) static void if_stop_hello_timer(struct iface_af *ia) { - THREAD_TIMER_OFF(ia->hello_timer); + thread_cancel(&ia->hello_timer); } struct ctl_iface * @@ -753,8 +753,7 @@ static void start_wait_for_ldp_sync_timer(struct iface *iface) if (iface->ldp_sync.wait_for_sync_timer) return; - THREAD_TIMER_OFF(iface->ldp_sync.wait_for_sync_timer); - iface->ldp_sync.wait_for_sync_timer = NULL; + THREAD_OFF(iface->ldp_sync.wait_for_sync_timer); thread_add_timer(master, iface_wait_for_ldp_sync_timer, iface, if_get_wait_for_sync_interval(), &iface->ldp_sync.wait_for_sync_timer); @@ -762,8 +761,7 @@ static void start_wait_for_ldp_sync_timer(struct iface *iface) static void stop_wait_for_ldp_sync_timer(struct iface *iface) { - THREAD_TIMER_OFF(iface->ldp_sync.wait_for_sync_timer); - iface->ldp_sync.wait_for_sync_timer = NULL; + THREAD_OFF(iface->ldp_sync.wait_for_sync_timer); } static int |
