summaryrefslogtreecommitdiff
path: root/bgpd/bgp_fsm.h
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-01-27 14:32:22 -0500
committerMark Stapp <mjs@voltanet.io>2021-02-09 12:10:51 -0500
commita9318a32871e7ae6934a7df8adf78245ccc1d140 (patch)
treeb61d80b18c85305fd29dbeccc210bf795a0f97be /bgpd/bgp_fsm.h
parentaea25d1ec828226fa35af1b333d346883deefb28 (diff)
libs, bgpd: improve task cancellation by argument value
Extend the thread_cancel_event api so that it's more complete: look in all the lists of events, including io and timers, for matching tasks. Add a limited version of the api that only examines tasks in the event and ready queues. BGP appears to require the old behavior, so change its macro to use the more limited cancel api. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'bgpd/bgp_fsm.h')
-rw-r--r--bgpd/bgp_fsm.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h
index cd464d8c58..bf4966c839 100644
--- a/bgpd/bgp_fsm.h
+++ b/bgpd/bgp_fsm.h
@@ -31,7 +31,7 @@
#define BGP_TIMER_OFF(T) \
do { \
- THREAD_OFF(T); \
+ THREAD_OFF((T)); \
} while (0)
#define BGP_EVENT_ADD(P, E) \
@@ -44,7 +44,7 @@
#define BGP_EVENT_FLUSH(P) \
do { \
assert(peer); \
- thread_cancel_event(bm->master, (P)); \
+ thread_cancel_event_ready(bm->master, (P)); \
} while (0)
#define BGP_UPDATE_GROUP_TIMER_ON(T, F) \
@@ -53,10 +53,10 @@
PEER_ROUTE_ADV_DELAY(peer)) \
thread_add_timer_msec(bm->master, (F), peer, \
(BGP_DEFAULT_UPDATE_ADVERTISEMENT_TIME * 1000),\
- T); \
+ (T)); \
else \
thread_add_timer_msec(bm->master, (F), peer, \
- 0, T); \
+ 0, (T)); \
} while (0) \
#define BGP_MSEC_JITTER 10