]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: Remove various macros that overlap THREAD_OFF
authorDonald Sharp <sharpd@nvidia.com>
Fri, 3 Jun 2022 14:28:11 +0000 (10:28 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 21 Jul 2022 12:27:35 +0000 (08:27 -0400)
Let's just use THREAD_OFF consistently in the code base
instead of each daemon having a special macro that needs to
be looked at and remembered what it does.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 files changed:
ospfd/ospf_gr.c
ospfd/ospf_interface.c
ospfd/ospf_ism.c
ospfd/ospf_ism.h
ospfd/ospf_lsa.c
ospfd/ospf_neighbor.c
ospfd/ospf_nsm.c
ospfd/ospf_nsm.h
ospfd/ospf_opaque.c
ospfd/ospf_packet.c
ospfd/ospf_vty.c
ospfd/ospfd.c
ospfd/ospfd.h

index 2521f2fce0badda48569d4d87f78c7ffc8f33cf1..66ef1d6564d967e5855af6cf9986860064704dae 100644 (file)
@@ -216,7 +216,7 @@ static void ospf_gr_restart_exit(struct ospf *ospf, const char *reason)
                zlog_debug("GR: exiting graceful restart: %s", reason);
 
        ospf->gr_info.restart_in_progress = false;
-       OSPF_TIMER_OFF(ospf->gr_info.t_grace_period);
+       THREAD_OFF(ospf->gr_info.t_grace_period);
 
        /* Record in non-volatile memory that the restart is complete. */
        ospf_gr_nvm_delete(ospf);
index 5df2ecf070dccf282392151c523490c7da86a673..633ab051313e08892f609c89fea3b50a0c237d9b 100644 (file)
@@ -302,7 +302,7 @@ void ospf_if_cleanup(struct ospf_interface *oi)
        /* oi->nbrs and oi->nbr_nbma should be deleted on InterfaceDown event */
        /* delete all static neighbors attached to this interface */
        for (ALL_LIST_ELEMENTS(oi->nbr_nbma, node, nnode, nbr_nbma)) {
-               OSPF_POLL_TIMER_OFF(nbr_nbma->t_poll);
+               THREAD_OFF(nbr_nbma->t_poll);
 
                if (nbr_nbma->nbr) {
                        nbr_nbma->nbr->nbr_nbma = NULL;
@@ -513,7 +513,7 @@ void ospf_if_stream_unset(struct ospf_interface *oi)
        if (oi->on_write_q) {
                listnode_delete(ospf->oi_write_q, oi);
                if (list_isempty(ospf->oi_write_q))
-                       OSPF_TIMER_OFF(ospf->t_write);
+                       THREAD_OFF(ospf->t_write);
                oi->on_write_q = 0;
        }
 }
@@ -1474,7 +1474,7 @@ void ospf_reset_hello_timer(struct interface *ifp, struct in_addr addr,
                        ospf_hello_send(oi);
 
                        /* Restart hello timer for this interface */
-                       OSPF_ISM_TIMER_OFF(oi->t_hello);
+                       THREAD_OFF(oi->t_hello);
                        OSPF_HELLO_TIMER_ON(oi);
                }
 
@@ -1498,7 +1498,7 @@ void ospf_reset_hello_timer(struct interface *ifp, struct in_addr addr,
                ospf_hello_send(oi);
 
                /* Restart the hello timer. */
-               OSPF_ISM_TIMER_OFF(oi->t_hello);
+               THREAD_OFF(oi->t_hello);
                OSPF_HELLO_TIMER_ON(oi);
        }
 }
index 97da61034f1e65f12130b41d90f3cb8b26e6d5ea..ab75ab9a1a336fae98a389f349b145f75921780b 100644 (file)
@@ -290,16 +290,16 @@ static void ism_timer_set(struct ospf_interface *oi)
                   interface parameters must be set to initial values, and
                   timers are
                   reset also. */
-               OSPF_ISM_TIMER_OFF(oi->t_hello);
-               OSPF_ISM_TIMER_OFF(oi->t_wait);
-               OSPF_ISM_TIMER_OFF(oi->t_ls_ack);
+               THREAD_OFF(oi->t_hello);
+               THREAD_OFF(oi->t_wait);
+               THREAD_OFF(oi->t_ls_ack);
                break;
        case ISM_Loopback:
                /* In this state, the interface may be looped back and will be
                   unavailable for regular data traffic. */
-               OSPF_ISM_TIMER_OFF(oi->t_hello);
-               OSPF_ISM_TIMER_OFF(oi->t_wait);
-               OSPF_ISM_TIMER_OFF(oi->t_ls_ack);
+               THREAD_OFF(oi->t_hello);
+               THREAD_OFF(oi->t_wait);
+               THREAD_OFF(oi->t_ls_ack);
                break;
        case ISM_Waiting:
                /* The router is trying to determine the identity of DRouter and
@@ -309,7 +309,7 @@ static void ism_timer_set(struct ospf_interface *oi)
                OSPF_ISM_TIMER_MSEC_ON(oi->t_hello, ospf_hello_timer, 1);
                OSPF_ISM_TIMER_ON(oi->t_wait, ospf_wait_timer,
                                  OSPF_IF_PARAM(oi, v_wait));
-               OSPF_ISM_TIMER_OFF(oi->t_ls_ack);
+               THREAD_OFF(oi->t_ls_ack);
                break;
        case ISM_PointToPoint:
                /* The interface connects to a physical Point-to-point network
@@ -318,7 +318,7 @@ static void ism_timer_set(struct ospf_interface *oi)
                   neighboring router. Hello packets are also sent. */
                /* send first hello immediately */
                OSPF_ISM_TIMER_MSEC_ON(oi->t_hello, ospf_hello_timer, 1);
-               OSPF_ISM_TIMER_OFF(oi->t_wait);
+               THREAD_OFF(oi->t_wait);
                OSPF_ISM_TIMER_ON(oi->t_ls_ack, ospf_ls_ack_timer,
                                  oi->v_ls_ack);
                break;
@@ -328,7 +328,7 @@ static void ism_timer_set(struct ospf_interface *oi)
                   and the router itself is neither Designated Router nor
                   Backup Designated Router. */
                OSPF_HELLO_TIMER_ON(oi);
-               OSPF_ISM_TIMER_OFF(oi->t_wait);
+               THREAD_OFF(oi->t_wait);
                OSPF_ISM_TIMER_ON(oi->t_ls_ack, ospf_ls_ack_timer,
                                  oi->v_ls_ack);
                break;
@@ -337,7 +337,7 @@ static void ism_timer_set(struct ospf_interface *oi)
                   network,
                   and the router is Backup Designated Router. */
                OSPF_HELLO_TIMER_ON(oi);
-               OSPF_ISM_TIMER_OFF(oi->t_wait);
+               THREAD_OFF(oi->t_wait);
                OSPF_ISM_TIMER_ON(oi->t_ls_ack, ospf_ls_ack_timer,
                                  oi->v_ls_ack);
                break;
@@ -346,7 +346,7 @@ static void ism_timer_set(struct ospf_interface *oi)
                   network,
                   and the router is Designated Router. */
                OSPF_HELLO_TIMER_ON(oi);
-               OSPF_ISM_TIMER_OFF(oi->t_wait);
+               THREAD_OFF(oi->t_wait);
                OSPF_ISM_TIMER_ON(oi->t_ls_ack, ospf_ls_ack_timer,
                                  oi->v_ls_ack);
                break;
index 35fbd15d002f6a0b183527b0defbc1ce557cc546..92329bc55ee529c3111f311aea26cfb618707a2f 100644 (file)
@@ -78,9 +78,6 @@
                                          OSPF_IF_PARAM((O), v_hello));        \
        } while (0)
 
-/* Macro for OSPF ISM timer turn off. */
-#define OSPF_ISM_TIMER_OFF(X) thread_cancel(&(X))
-
 /* Macro for OSPF schedule event. */
 #define OSPF_ISM_EVENT_SCHEDULE(I, E)                                          \
        thread_add_event(master, ospf_ism_event, (I), (E), NULL)
index 39330fb92637d56c22ff63783d463243a32fb151..2c2ddd4394d9fb007e122ce9a96a045232cf8a09 100644 (file)
@@ -3625,7 +3625,7 @@ void ospf_flush_self_originated_lsas_now(struct ospf *ospf)
         * without conflicting to other threads.
         */
        if (ospf->t_maxage != NULL) {
-               OSPF_TIMER_OFF(ospf->t_maxage);
+               THREAD_OFF(ospf->t_maxage);
                thread_execute(master, ospf_maxage_lsa_remover, ospf, 0);
        }
 
index c59734b9f3140d586332c650103bd3967a6de244..02c44dcdc19ca4c0f3de9d8391d161bda807ccc2 100644 (file)
@@ -140,17 +140,17 @@ void ospf_nbr_free(struct ospf_neighbor *nbr)
        }
 
        /* Cancel all timers. */
-       OSPF_NSM_TIMER_OFF(nbr->t_inactivity);
-       OSPF_NSM_TIMER_OFF(nbr->t_db_desc);
-       OSPF_NSM_TIMER_OFF(nbr->t_ls_req);
-       OSPF_NSM_TIMER_OFF(nbr->t_ls_upd);
+       THREAD_OFF(nbr->t_inactivity);
+       THREAD_OFF(nbr->t_db_desc);
+       THREAD_OFF(nbr->t_ls_req);
+       THREAD_OFF(nbr->t_ls_upd);
 
        /* Cancel all events. */ /* Thread lookup cost would be negligible. */
        thread_cancel_event(master, nbr);
 
        bfd_sess_free(&nbr->bfd_session);
 
-       OSPF_NSM_TIMER_OFF(nbr->gr_helper_info.t_grace_timer);
+       THREAD_OFF(nbr->gr_helper_info.t_grace_timer);
 
        nbr->oi = NULL;
        XFREE(MTYPE_OSPF_NEIGHBOR, nbr);
@@ -456,7 +456,7 @@ static struct ospf_neighbor *ospf_nbr_add(struct ospf_interface *oi,
                                nbr->nbr_nbma = nbr_nbma;
 
                                if (nbr_nbma->t_poll)
-                                       OSPF_POLL_TIMER_OFF(nbr_nbma->t_poll);
+                                       THREAD_OFF(nbr_nbma->t_poll);
 
                                nbr->state_change = nbr_nbma->state_change + 1;
                        }
index c538d1a09a4b10e9c37778831656411bab89ee95..333389596b1b97f120ec24c5738914e5243ac11f 100644 (file)
@@ -120,32 +120,32 @@ static void nsm_timer_set(struct ospf_neighbor *nbr)
        switch (nbr->state) {
        case NSM_Deleted:
        case NSM_Down:
-               OSPF_NSM_TIMER_OFF(nbr->t_inactivity);
-               OSPF_NSM_TIMER_OFF(nbr->t_hello_reply);
+               THREAD_OFF(nbr->t_inactivity);
+               THREAD_OFF(nbr->t_hello_reply);
        /* fallthru */
        case NSM_Attempt:
        case NSM_Init:
        case NSM_TwoWay:
-               OSPF_NSM_TIMER_OFF(nbr->t_db_desc);
-               OSPF_NSM_TIMER_OFF(nbr->t_ls_upd);
-               OSPF_NSM_TIMER_OFF(nbr->t_ls_req);
+               THREAD_OFF(nbr->t_db_desc);
+               THREAD_OFF(nbr->t_ls_upd);
+               THREAD_OFF(nbr->t_ls_req);
                break;
        case NSM_ExStart:
                OSPF_NSM_TIMER_ON(nbr->t_db_desc, ospf_db_desc_timer,
                                  nbr->v_db_desc);
-               OSPF_NSM_TIMER_OFF(nbr->t_ls_upd);
-               OSPF_NSM_TIMER_OFF(nbr->t_ls_req);
+               THREAD_OFF(nbr->t_ls_upd);
+               THREAD_OFF(nbr->t_ls_req);
                break;
        case NSM_Exchange:
                OSPF_NSM_TIMER_ON(nbr->t_ls_upd, ospf_ls_upd_timer,
                                  nbr->v_ls_upd);
                if (!IS_SET_DD_MS(nbr->dd_flags))
-                       OSPF_NSM_TIMER_OFF(nbr->t_db_desc);
+                       THREAD_OFF(nbr->t_db_desc);
                break;
        case NSM_Loading:
        case NSM_Full:
        default:
-               OSPF_NSM_TIMER_OFF(nbr->t_db_desc);
+               THREAD_OFF(nbr->t_db_desc);
                break;
        }
 }
@@ -176,13 +176,13 @@ int nsm_should_adj(struct ospf_neighbor *nbr)
 static int nsm_hello_received(struct ospf_neighbor *nbr)
 {
        /* Start or Restart Inactivity Timer. */
-       OSPF_NSM_TIMER_OFF(nbr->t_inactivity);
+       THREAD_OFF(nbr->t_inactivity);
 
        OSPF_NSM_TIMER_ON(nbr->t_inactivity, ospf_inactivity_timer,
                          nbr->v_inactivity);
 
        if (nbr->oi->type == OSPF_IFTYPE_NBMA && nbr->nbr_nbma)
-               OSPF_POLL_TIMER_OFF(nbr->nbr_nbma->t_poll);
+               THREAD_OFF(nbr->nbr_nbma->t_poll);
 
        /* Send proactive ARP requests */
        if (nbr->state < NSM_Exchange)
@@ -194,9 +194,9 @@ static int nsm_hello_received(struct ospf_neighbor *nbr)
 static int nsm_start(struct ospf_neighbor *nbr)
 {
        if (nbr->nbr_nbma)
-               OSPF_POLL_TIMER_OFF(nbr->nbr_nbma->t_poll);
+               THREAD_OFF(nbr->nbr_nbma->t_poll);
 
-       OSPF_NSM_TIMER_OFF(nbr->t_inactivity);
+       THREAD_OFF(nbr->t_inactivity);
 
        OSPF_NSM_TIMER_ON(nbr->t_inactivity, ospf_inactivity_timer,
                          nbr->v_inactivity);
index 0b40b1f424b4eed7ae09b6c9aa5e43e7f493a732..c526c4c3edd72edc8c47457175e0c86906c2d2ef 100644 (file)
@@ -58,9 +58,6 @@
 /* Macro for OSPF NSM timer turn on. */
 #define OSPF_NSM_TIMER_ON(T,F,V) thread_add_timer (master, (F), nbr, (V), &(T))
 
-/* Macro for OSPF NSM timer turn off. */
-#define OSPF_NSM_TIMER_OFF(X) thread_cancel(&(X))
-
 /* Macro for OSPF NSM schedule event. */
 #define OSPF_NSM_EVENT_SCHEDULE(N, E)                                          \
        thread_add_event(master, ospf_nsm_event, (N), (E), NULL)
index 7e95cb591a7c75df087c1a73fd19ac7b6570b2fc..c7ac81d9616a9c35a3246c70aed61b8a75c5feb5 100644 (file)
@@ -147,7 +147,7 @@ int ospf_opaque_type9_lsa_init(struct ospf_interface *oi)
 
 void ospf_opaque_type9_lsa_term(struct ospf_interface *oi)
 {
-       OSPF_TIMER_OFF(oi->t_opaque_lsa_self);
+       THREAD_OFF(oi->t_opaque_lsa_self);
        if (oi->opaque_lsa_self != NULL)
                list_delete(&oi->opaque_lsa_self);
        oi->opaque_lsa_self = NULL;
@@ -176,7 +176,7 @@ void ospf_opaque_type10_lsa_term(struct ospf_area *area)
        area->lsdb->new_lsa_hook = area->lsdb->del_lsa_hook = NULL;
 #endif /* MONITOR_LSDB_CHANGE */
 
-       OSPF_TIMER_OFF(area->t_opaque_lsa_self);
+       THREAD_OFF(area->t_opaque_lsa_self);
        if (area->opaque_lsa_self != NULL)
                list_delete(&area->opaque_lsa_self);
        return;
@@ -204,7 +204,7 @@ void ospf_opaque_type11_lsa_term(struct ospf *top)
        top->lsdb->new_lsa_hook = top->lsdb->del_lsa_hook = NULL;
 #endif /* MONITOR_LSDB_CHANGE */
 
-       OSPF_TIMER_OFF(top->t_opaque_lsa_self);
+       THREAD_OFF(top->t_opaque_lsa_self);
        if (top->opaque_lsa_self != NULL)
                list_delete(&top->opaque_lsa_self);
        return;
@@ -603,7 +603,7 @@ static void free_opaque_info_per_type(struct opaque_info_per_type *oipt,
                ospf_opaque_lsa_flush_schedule(lsa);
        }
 
-       OSPF_TIMER_OFF(oipt->t_opaque_lsa_self);
+       THREAD_OFF(oipt->t_opaque_lsa_self);
        list_delete(&oipt->id_list);
        if (cleanup_owner) {
                /* Remove from its owner's self-originated LSA list. */
@@ -711,7 +711,7 @@ static void free_opaque_info_per_id(void *val)
 {
        struct opaque_info_per_id *oipi = (struct opaque_info_per_id *)val;
 
-       OSPF_TIMER_OFF(oipi->t_opaque_lsa_self);
+       THREAD_OFF(oipi->t_opaque_lsa_self);
        if (oipi->lsa != NULL)
                ospf_lsa_unlock(&oipi->lsa);
        XFREE(MTYPE_OPAQUE_INFO_PER_ID, oipi);
index c319f8068a06bd30b5a23097b06995f5167dae66..d2ade9f113f5ad32cc410ffc5f713cef9c87c2d5 100644 (file)
@@ -4103,7 +4103,7 @@ static void ospf_ls_upd_queue_send(struct ospf_interface *oi,
                 * is actually turned off.
                 */
                if (list_isempty(oi->ospf->oi_write_q))
-                       OSPF_TIMER_OFF(oi->ospf->t_write);
+                       THREAD_OFF(oi->ospf->t_write);
        } else {
                /* Hook thread to write packet. */
                OSPF_ISM_WRITE_ON(oi->ospf);
index 5bb65b6abc35d8caa978aedc174f994b24dd315a..1c22fad669206b48b72b453f3f1b7d86733ff045 100644 (file)
@@ -9748,7 +9748,7 @@ DEFUN (no_ospf_max_metric_router_lsa_startup,
        for (ALL_LIST_ELEMENTS_RO(ospf->areas, ln, area)) {
                SET_FLAG(area->stub_router_state,
                         OSPF_AREA_WAS_START_STUB_ROUTED);
-               OSPF_TIMER_OFF(area->t_stub_router);
+               THREAD_OFF(area->t_stub_router);
 
                /* Don't trample on admin stub routed */
                if (!CHECK_FLAG(area->stub_router_state,
index 33872950ac7a38329de6d231827cf9b13e7a8ab0..d10c03e586b23279e9e405adc77474cfc1ae32f1 100644 (file)
@@ -572,7 +572,7 @@ static struct ospf *ospf_lookup_by_name(const char *vrf_name)
 static void ospf_deferred_shutdown_finish(struct ospf *ospf)
 {
        ospf->stub_router_shutdown_time = OSPF_STUB_ROUTER_UNCONFIGURED;
-       OSPF_TIMER_OFF(ospf->t_deferred_shutdown);
+       THREAD_OFF(ospf->t_deferred_shutdown);
 
        ospf_finish_final(ospf);
 
@@ -754,7 +754,7 @@ static void ospf_finish_final(struct ospf *ospf)
        /* Clear static neighbors */
        for (rn = route_top(ospf->nbr_nbma); rn; rn = route_next(rn))
                if ((nbr_nbma = rn->info)) {
-                       OSPF_POLL_TIMER_OFF(nbr_nbma->t_poll);
+                       THREAD_OFF(nbr_nbma->t_poll);
 
                        if (nbr_nbma->nbr) {
                                nbr_nbma->nbr->nbr_nbma = NULL;
@@ -790,22 +790,22 @@ static void ospf_finish_final(struct ospf *ospf)
        }
 
        /* Cancel all timers. */
-       OSPF_TIMER_OFF(ospf->t_read);
-       OSPF_TIMER_OFF(ospf->t_write);
-       OSPF_TIMER_OFF(ospf->t_spf_calc);
-       OSPF_TIMER_OFF(ospf->t_ase_calc);
-       OSPF_TIMER_OFF(ospf->t_maxage);
-       OSPF_TIMER_OFF(ospf->t_maxage_walker);
-       OSPF_TIMER_OFF(ospf->t_abr_task);
-       OSPF_TIMER_OFF(ospf->t_asbr_check);
-       OSPF_TIMER_OFF(ospf->t_asbr_nssa_redist_update);
-       OSPF_TIMER_OFF(ospf->t_distribute_update);
-       OSPF_TIMER_OFF(ospf->t_lsa_refresher);
-       OSPF_TIMER_OFF(ospf->t_opaque_lsa_self);
-       OSPF_TIMER_OFF(ospf->t_sr_update);
-       OSPF_TIMER_OFF(ospf->t_default_routemap_timer);
-       OSPF_TIMER_OFF(ospf->t_external_aggr);
-       OSPF_TIMER_OFF(ospf->gr_info.t_grace_period);
+       THREAD_OFF(ospf->t_read);
+       THREAD_OFF(ospf->t_write);
+       THREAD_OFF(ospf->t_spf_calc);
+       THREAD_OFF(ospf->t_ase_calc);
+       THREAD_OFF(ospf->t_maxage);
+       THREAD_OFF(ospf->t_maxage_walker);
+       THREAD_OFF(ospf->t_abr_task);
+       THREAD_OFF(ospf->t_asbr_check);
+       THREAD_OFF(ospf->t_asbr_nssa_redist_update);
+       THREAD_OFF(ospf->t_distribute_update);
+       THREAD_OFF(ospf->t_lsa_refresher);
+       THREAD_OFF(ospf->t_opaque_lsa_self);
+       THREAD_OFF(ospf->t_sr_update);
+       THREAD_OFF(ospf->t_default_routemap_timer);
+       THREAD_OFF(ospf->t_external_aggr);
+       THREAD_OFF(ospf->gr_info.t_grace_period);
 
        LSDB_LOOP (OPAQUE_AS_LSDB(ospf), rn, lsa)
                ospf_discard_from_db(ospf, ospf->lsdb, lsa);
@@ -992,8 +992,8 @@ static void ospf_area_free(struct ospf_area *area)
                free(IMPORT_NAME(area));
 
        /* Cancel timer. */
-       OSPF_TIMER_OFF(area->t_stub_router);
-       OSPF_TIMER_OFF(area->t_opaque_lsa_self);
+       THREAD_OFF(area->t_stub_router);
+       THREAD_OFF(area->t_opaque_lsa_self);
 
        if (OSPF_IS_AREA_BACKBONE(area))
                area->ospf->backbone = NULL;
@@ -1836,7 +1836,7 @@ int ospf_timers_refresh_set(struct ospf *ospf, int interval)
                    - (monotime(NULL) - ospf->lsa_refresher_started);
 
        if (time_left > interval) {
-               OSPF_TIMER_OFF(ospf->t_lsa_refresher);
+               THREAD_OFF(ospf->t_lsa_refresher);
                thread_add_timer(master, ospf_lsa_refresh_walker, ospf,
                                 interval, &ospf->t_lsa_refresher);
        }
@@ -1853,7 +1853,7 @@ int ospf_timers_refresh_unset(struct ospf *ospf)
                    - (monotime(NULL) - ospf->lsa_refresher_started);
 
        if (time_left > OSPF_LSA_REFRESH_INTERVAL_DEFAULT) {
-               OSPF_TIMER_OFF(ospf->t_lsa_refresher);
+               THREAD_OFF(ospf->t_lsa_refresher);
                ospf->t_lsa_refresher = NULL;
                thread_add_timer(master, ospf_lsa_refresh_walker, ospf,
                                 OSPF_LSA_REFRESH_INTERVAL_DEFAULT,
@@ -1905,7 +1905,7 @@ static void ospf_nbr_nbma_delete(struct ospf *ospf,
 
 static void ospf_nbr_nbma_down(struct ospf_nbr_nbma *nbr_nbma)
 {
-       OSPF_TIMER_OFF(nbr_nbma->t_poll);
+       THREAD_OFF(nbr_nbma->t_poll);
 
        if (nbr_nbma->nbr) {
                nbr_nbma->nbr->nbr_nbma = NULL;
@@ -2094,7 +2094,7 @@ int ospf_nbr_nbma_poll_interval_set(struct ospf *ospf, struct in_addr nbr_addr,
        if (nbr_nbma->v_poll != interval) {
                nbr_nbma->v_poll = interval;
                if (nbr_nbma->oi && ospf_if_is_up(nbr_nbma->oi)) {
-                       OSPF_TIMER_OFF(nbr_nbma->t_poll);
+                       THREAD_OFF(nbr_nbma->t_poll);
                        OSPF_POLL_TIMER_ON(nbr_nbma->t_poll, ospf_poll_timer,
                                           nbr_nbma->v_poll);
                }
index 401a89fa38e402d0268be2449ceaa507f307a0ea..8478c96ddcd63ef4d4c413e0601c15eb550b36f5 100644 (file)
@@ -647,8 +647,6 @@ struct ospf_nbr_nbma {
 #define OSPF_TIMER_ON(T,F,V) thread_add_timer (master,(F),ospf,(V),&(T))
 #define OSPF_AREA_TIMER_ON(T,F,V) thread_add_timer (master, (F), area, (V), &(T))
 #define OSPF_POLL_TIMER_ON(T,F,V) thread_add_timer (master, (F), nbr_nbma, (V), &(T))
-#define OSPF_POLL_TIMER_OFF(X) OSPF_TIMER_OFF((X))
-#define OSPF_TIMER_OFF(X) thread_cancel(&(X))
 
 /* Extern variables. */
 extern struct ospf_master *om;