diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-10-14 14:50:08 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-14 14:50:08 +0300 |
| commit | 9ed5b22e1337e0c33d2580b1c7444be6847d69d9 (patch) | |
| tree | 3d88b8c37ada43a83fcf08b17b9d00ce9f0f0a1a /lib/ldp_sync.c | |
| parent | 4fe30ff1ebbfc6a95c8fad82efe8f43e64bde7f5 (diff) | |
| parent | 28ef0ee121aa93399d8684a59d6ca66ee07ade84 (diff) | |
Merge pull request #7283 from donaldsharp/thread_off_semantics
*: Use proper semantics for turning off thread
Diffstat (limited to 'lib/ldp_sync.c')
| -rw-r--r-- | lib/ldp_sync.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ldp_sync.c b/lib/ldp_sync.c index 5dd045d88d..9657f0b1df 100644 --- a/lib/ldp_sync.c +++ b/lib/ldp_sync.c @@ -79,10 +79,8 @@ bool ldp_sync_if_down(struct ldp_sync_info *ldp_sync_info) * update state */ if (ldp_sync_info && ldp_sync_info->enabled == LDP_IGP_SYNC_ENABLED) { - if (ldp_sync_info->t_holddown != NULL) { - THREAD_TIMER_OFF(ldp_sync_info->t_holddown); - ldp_sync_info->t_holddown = NULL; - } + THREAD_TIMER_OFF(ldp_sync_info->t_holddown); + if (ldp_sync_info->state == LDP_IGP_SYNC_STATE_REQUIRED_UP) ldp_sync_info->state = LDP_IGP_SYNC_STATE_REQUIRED_NOT_UP; |
