summaryrefslogtreecommitdiff
path: root/isisd/isis_tx_queue.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-07-06 12:55:03 -0400
committerMark Stapp <mjs@voltanet.io>2020-10-23 08:59:34 -0400
commitb3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 (patch)
treeb5ef6dcab41d9da516a6ff044056e0faca7b35da /isisd/isis_tx_queue.c
parent90a65457d12d8d90bf47eab1a4bb5446b3810d96 (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 'isisd/isis_tx_queue.c')
-rw-r--r--isisd/isis_tx_queue.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/isisd/isis_tx_queue.c b/isisd/isis_tx_queue.c
index 1424b55bdc..5c87e39157 100644
--- a/isisd/isis_tx_queue.c
+++ b/isisd/isis_tx_queue.c
@@ -93,8 +93,7 @@ static void tx_queue_element_free(void *element)
{
struct isis_tx_queue_entry *e = element;
- if (e->retry)
- thread_cancel(e->retry);
+ thread_cancel(&(e->retry));
XFREE(MTYPE_TX_QUEUE_ENTRY, e);
}
@@ -166,8 +165,7 @@ void _isis_tx_queue_add(struct isis_tx_queue *queue,
e->type = type;
- if (e->retry)
- thread_cancel(e->retry);
+ thread_cancel(&(e->retry));
thread_add_event(master, tx_queue_send_event, e, 0, &e->retry);
e->is_retry = false;
@@ -190,8 +188,7 @@ void _isis_tx_queue_del(struct isis_tx_queue *queue, struct isis_lsp *lsp,
func, file, line);
}
- if (e->retry)
- thread_cancel(e->retry);
+ thread_cancel(&(e->retry));
hash_release(queue->hash, e);
XFREE(MTYPE_TX_QUEUE_ENTRY, e);