diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-07-06 12:55:03 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2020-10-23 08:59:34 -0400 |
| commit | b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 (patch) | |
| tree | b5ef6dcab41d9da516a6ff044056e0faca7b35da /ospfd/ospf_packet.c | |
| parent | 90a65457d12d8d90bf47eab1a4bb5446b3810d96 (diff) | |
* : 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 'ospfd/ospf_packet.c')
| -rw-r--r-- | ospfd/ospf_packet.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 8cb0062ea4..ef39b6c2f6 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -468,11 +468,7 @@ static int ospf_ls_req_timer(struct thread *thread) void ospf_ls_req_event(struct ospf_neighbor *nbr) { - if (nbr->t_ls_req) { - thread_cancel(nbr->t_ls_req); - nbr->t_ls_req = NULL; - } - nbr->t_ls_req = NULL; + thread_cancel(&nbr->t_ls_req); thread_add_event(master, ospf_ls_req_timer, nbr, 0, &nbr->t_ls_req); } |
