#include <zebra.h>
-#include "thread.h"
+#include "frrevent.h"
#include "memory.h"
#include "linklist.h"
#include "prefix.h"
if (ospf->enable_rtr_list == NULL)
return;
- hash_clean(ospf->enable_rtr_list, ospf_disable_rtr_hash_free);
- hash_free(ospf->enable_rtr_list);
- ospf->enable_rtr_list = NULL;
+ hash_clean_and_free(&ospf->enable_rtr_list, ospf_disable_rtr_hash_free);
}
/*
* Returns:
* Nothing
*/
-static void ospf_handle_grace_timer_expiry(struct thread *thread)
+static void ospf_handle_grace_timer_expiry(struct event *thread)
{
- struct ospf_neighbor *nbr = THREAD_ARG(thread);
+ struct ospf_neighbor *nbr = EVENT_ARG(thread);
nbr->gr_helper_info.t_grace_timer = NULL;
if (OSPF_GR_IS_ACTIVE_HELPER(restarter)) {
if (restarter->gr_helper_info.t_grace_timer)
- THREAD_OFF(restarter->gr_helper_info.t_grace_timer);
+ EVENT_OFF(restarter->gr_helper_info.t_grace_timer);
if (ospf->active_restarter_cnt > 0)
ospf->active_restarter_cnt--;
actual_grace_interval);
/* Start the grace timer */
- thread_add_timer(master, ospf_handle_grace_timer_expiry, restarter,
- actual_grace_interval,
- &restarter->gr_helper_info.t_grace_timer);
+ event_add_timer(master, ospf_handle_grace_timer_expiry, restarter,
+ actual_grace_interval,
+ &restarter->gr_helper_info.t_grace_timer);
return OSPF_GR_ACTIVE_HELPER;
}
* expiry, stop the grace timer.
*/
if (reason != OSPF_GR_HELPER_GRACE_TIMEOUT)
- THREAD_OFF(nbr->gr_helper_info.t_grace_timer);
+ EVENT_OFF(nbr->gr_helper_info.t_grace_timer);
/* check exit triggered due to successful completion
* of graceful restart.