]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospfd.c
Merge remote-tracking branch 'origin/stable/2.0'
[mirror_frr.git] / ospfd / ospfd.c
index b83093db3c982377ed9ccd981c2ea79e4c65d407..570734bd8cac81d3b57b87295270db2885b052aa 100644 (file)
@@ -55,6 +55,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 #include "ospfd/ospf_ase.h"
 
 
+DEFINE_QOBJ_TYPE(ospf)
 
 /* OSPF process wide configuration. */
 static struct ospf_master ospf_master;
@@ -272,7 +273,7 @@ ospf_new (u_short instance)
   new->lsa_refresh_interval = OSPF_LSA_REFRESH_INTERVAL_DEFAULT;
   new->t_lsa_refresher = thread_add_timer (master, ospf_lsa_refresh_walker,
                                           new, new->lsa_refresh_interval);
-  new->lsa_refresher_started = quagga_monotime ();
+  new->lsa_refresher_started = monotime(NULL);
 
   if ((new->fd = ospf_sock_init()) < 0)
     {
@@ -292,6 +293,8 @@ ospf_new (u_short instance)
   
   /* Enable "log-adjacency-changes" */
   SET_FLAG(new->config, OSPF_LOG_ADJACENCY_CHANGES);
+  QOBJ_REG (new, ospf);
+
   return new;
 }
 
@@ -505,6 +508,8 @@ ospf_finish_final (struct ospf *ospf)
   int i;
   u_short instance = 0;
 
+  QOBJ_UNREG (ospf);
+
   ospf_opaque_type11_lsa_term (ospf);
   
   /* be nice if this worked, but it doesn't */
@@ -1578,7 +1583,7 @@ ospf_timers_refresh_set (struct ospf *ospf, int interval)
     return 1;
 
   time_left = ospf->lsa_refresh_interval -
-    (quagga_monotime () - ospf->lsa_refresher_started);
+    (monotime(NULL) - ospf->lsa_refresher_started);
   
   if (time_left > interval)
     {
@@ -1597,7 +1602,7 @@ ospf_timers_refresh_unset (struct ospf *ospf)
   int time_left;
 
   time_left = ospf->lsa_refresh_interval -
-    (quagga_monotime () - ospf->lsa_refresher_started);
+    (monotime(NULL) - ospf->lsa_refresher_started);
 
   if (time_left > OSPF_LSA_REFRESH_INTERVAL_DEFAULT)
     {