diff options
| author | Russ White <russ@riw.us> | 2017-05-10 13:51:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-10 13:51:47 -0400 |
| commit | 00a1578051ceeb26b0b9c2c3344cac1f202e047d (patch) | |
| tree | 248b55b1ab56e39025d9902c53564286558eda60 /ospf6d/ospf6_intra.h | |
| parent | 0896b755080b300116d493444bfc05e2ef7ca9f6 (diff) | |
| parent | c94671b82f790492ceee226f98a65ad7e7e09967 (diff) | |
Merge pull request #408 from qlyoung/remove-thread-macros
*: remove THREAD_ON macros, add nullity check
Diffstat (limited to 'ospf6d/ospf6_intra.h')
| -rw-r--r-- | ospf6d/ospf6_intra.h | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h index c9660b6a5c..9975bbd627 100644 --- a/ospf6d/ospf6_intra.h +++ b/ospf6d/ospf6_intra.h @@ -156,40 +156,30 @@ struct ospf6_intra_prefix_lsa #define OSPF6_ROUTER_LSA_SCHEDULE(oa) \ do { \ - if (! (oa)->thread_router_lsa \ - && CHECK_FLAG((oa)->flag, OSPF6_AREA_ENABLE)) \ - (oa)->thread_router_lsa = \ - thread_add_event (master, ospf6_router_lsa_originate, oa, 0); \ + if (CHECK_FLAG((oa)->flag, OSPF6_AREA_ENABLE)) \ + thread_add_event (master, ospf6_router_lsa_originate, oa, 0, &(oa)->thread_router_lsa); \ } while (0) #define OSPF6_NETWORK_LSA_SCHEDULE(oi) \ do { \ - if (! (oi)->thread_network_lsa \ - && ! CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \ - (oi)->thread_network_lsa = \ - thread_add_event (master, ospf6_network_lsa_originate, oi, 0); \ + if (!CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \ + thread_add_event (master, ospf6_network_lsa_originate, oi, 0, &(oi)->thread_network_lsa); \ } while (0) #define OSPF6_LINK_LSA_SCHEDULE(oi) \ do { \ - if (! (oi)->thread_link_lsa \ - && ! CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \ - (oi)->thread_link_lsa = \ - thread_add_event (master, ospf6_link_lsa_originate, oi, 0); \ + if (!CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \ + thread_add_event (master, ospf6_link_lsa_originate, oi, 0, &(oi)->thread_link_lsa); \ } while (0) #define OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB(oa) \ do { \ - if (! (oa)->thread_intra_prefix_lsa \ - && CHECK_FLAG((oa)->flag, OSPF6_AREA_ENABLE)) \ - (oa)->thread_intra_prefix_lsa = \ - thread_add_event (master, ospf6_intra_prefix_lsa_originate_stub, \ - oa, 0); \ + if (CHECK_FLAG((oa)->flag, OSPF6_AREA_ENABLE)) \ + thread_add_event (master, ospf6_intra_prefix_lsa_originate_stub, \ + oa, 0, &(oa)->thread_intra_prefix_lsa); \ } while (0) #define OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT(oi) \ do { \ - if (! (oi)->thread_intra_prefix_lsa \ - && ! CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \ - (oi)->thread_intra_prefix_lsa = \ - thread_add_event (master, ospf6_intra_prefix_lsa_originate_transit, \ - oi, 0); \ + if (!CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \ + thread_add_event (master, ospf6_intra_prefix_lsa_originate_transit, \ + oi, 0, &(oi)->thread_intra_prefix_lsa); \ } while (0) #define OSPF6_NETWORK_LSA_EXECUTE(oi) \ |
