summaryrefslogtreecommitdiffstats
path: root/zebra/irdp_main.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-07-06 18:55:03 +0200
committerMark Stapp <mjs@voltanet.io>2020-10-23 14:59:34 +0200
commitb3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 (patch)
treeb5ef6dcab41d9da516a6ff044056e0faca7b35da /zebra/irdp_main.c
parentMerge pull request #7345 from opensourcerouting/bgp-aggr-suppress (diff)
downloadfrr-b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9.tar.xz
frr-b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9.zip
* : update signature of thread_cancel api
Change thread_cancel to take a ** to an event, NULL-check before dereferencing, and NULL the caller's pointer. Update many callers to use the new signature. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/irdp_main.c')
-rw-r--r--zebra/irdp_main.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index 710a32c45..936206641 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -263,9 +263,7 @@ void irdp_advert_off(struct interface *ifp)
if (!irdp)
return;
- if (irdp->t_advertise)
- thread_cancel(irdp->t_advertise);
- irdp->t_advertise = NULL;
+ thread_cancel(&irdp->t_advertise);
if (ifp->connected)
for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, ifc)) {
@@ -300,9 +298,7 @@ void process_solicit(struct interface *ifp)
return;
irdp->flags |= IF_SOLICIT;
- if (irdp->t_advertise)
- thread_cancel(irdp->t_advertise);
- irdp->t_advertise = NULL;
+ thread_cancel(&irdp->t_advertise);
timer = (frr_weak_random() % MAX_RESPONSE_DELAY) + 1;