diff options
Diffstat (limited to 'bgpd/bgp_fsm.h')
-rw-r--r-- | bgpd/bgp_fsm.h | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h index 4d0b48f52..67ba387eb 100644 --- a/bgpd/bgp_fsm.h +++ b/bgpd/bgp_fsm.h @@ -23,58 +23,58 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #define _QUAGGA_BGP_FSM_H /* Macro for BGP read, write and timer thread. */ -#define BGP_READ_ON(T,F,V) \ - do { \ - if (!(T) && (peer->status != Deleted)) \ - THREAD_READ_ON(bm->master,T,F,peer,V); \ +#define BGP_READ_ON(T,F,V) \ + do { \ + if ((peer->status != Deleted)) \ + thread_add_read (bm->master,(F),peer,(V),&(T)); \ } while (0) -#define BGP_READ_OFF(T) \ - do { \ - if (T) \ - THREAD_READ_OFF(T); \ +#define BGP_READ_OFF(T) \ + do { \ + if (T) \ + THREAD_READ_OFF(T); \ } while (0) -#define BGP_WRITE_ON(T,F,V) \ - do { \ - if (!(T) && (peer->status != Deleted)) \ - THREAD_WRITE_ON(bm->master,(T),(F),peer,(V)); \ +#define BGP_WRITE_ON(T,F,V) \ + do { \ + if ((peer)->status != Deleted) \ + thread_add_write (bm->master,(F),(peer),(V),&(T)); \ } while (0) -#define BGP_PEER_WRITE_ON(T,F,V, peer) \ - do { \ - if (!(T) && ((peer)->status != Deleted)) \ - THREAD_WRITE_ON(bm->master,(T),(F),(peer),(V)); \ +#define BGP_PEER_WRITE_ON(T,F,V, peer) \ + do { \ + if ((peer)->status != Deleted) \ + thread_add_write (bm->master,(F),(peer),(V),&(T)); \ } while (0) -#define BGP_WRITE_OFF(T) \ - do { \ - if (T) \ - THREAD_WRITE_OFF(T); \ +#define BGP_WRITE_OFF(T) \ + do { \ + if (T) \ + THREAD_WRITE_OFF(T); \ } while (0) -#define BGP_TIMER_ON(T,F,V) \ - do { \ - if (!(T) && (peer->status != Deleted)) \ - THREAD_TIMER_ON(bm->master,(T),(F),peer,(V)); \ +#define BGP_TIMER_ON(T,F,V) \ + do { \ + if ((peer->status != Deleted)) \ + thread_add_timer (bm->master,(F),peer,(V),&(T)); \ } while (0) -#define BGP_TIMER_OFF(T) \ - do { \ - if (T) \ - THREAD_TIMER_OFF(T); \ +#define BGP_TIMER_OFF(T) \ + do { \ + if (T) \ + THREAD_TIMER_OFF(T); \ } while (0) -#define BGP_EVENT_ADD(P,E) \ - do { \ - if ((P)->status != Deleted) \ - thread_add_event (bm->master, bgp_event, (P), (E)); \ +#define BGP_EVENT_ADD(P,E) \ + do { \ + if ((P)->status != Deleted) \ + thread_add_event (bm->master, bgp_event, (P), (E), NULL); \ } while (0) -#define BGP_EVENT_FLUSH(P) \ - do { \ - assert (peer); \ - thread_cancel_event (bm->master, (P)); \ +#define BGP_EVENT_FLUSH(P) \ + do { \ + assert (peer); \ + thread_cancel_event (bm->master, (P)); \ } while (0) #define BGP_MSEC_JITTER 10 |