]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[ospfd] rename graceful to deferred, fix a tiny compile warning.
authorpaul <paul>
Sat, 26 Nov 2005 13:31:11 +0000 (13:31 +0000)
committerpaul <paul>
Sat, 26 Nov 2005 13:31:11 +0000 (13:31 +0000)
2005-11-26 Paul Jakma <paul.jakma@sun.com>

* (general) s/graceful/deferred/ in all files, the former term
   is confusing wrt OSPF Graceful-Restart.
* ospfd.c: (ospf_deferred_shutdown_check) dont return
  a function which returns void. SOS complains about this.
  (ospf_finish)

ospfd/ChangeLog
ospfd/ospf_vty.c
ospfd/ospfd.c
ospfd/ospfd.h

index 064ed8399380c5d369a6ae5b4e8b133017e54469..cf6fef7fee6e0fdf41acb8519010aa791fb0e9e6 100644 (file)
@@ -2,6 +2,11 @@
 
        * ospf_api.c: (struct opaque_lsa) change from gcc zero-length
          array to C99 incomplete type array.
+       * (general) s/graceful/deferred/ in all files, the former term 
+          is confusing wrt OSPF Graceful-Restart.
+       * ospfd.c: (ospf_deferred_shutdown_check) dont return
+         a function which returns void. SOS complains about this.
+         (ospf_finish)
 
 2005-11-20 Paul Jakma <paul.jakma@sun.com>
 
index 385eb8d47d4c7f6fa46f3486c290102d51d1381f..cc66d119d9b5b593afd29a1b88b3ee80d9b20249 100644 (file)
@@ -2606,9 +2606,9 @@ DEFUN (show_ip_ospf,
            VTY_NEWLINE);
   
   /* Graceful shutdown */
-  if (ospf->t_graceful_shutdown)
-    vty_out (vty, " Graceful shutdown in progress, %s remaining%s",
-             ospf_timer_dump (ospf->t_graceful_shutdown,
+  if (ospf->t_deferred_shutdown)
+    vty_out (vty, " Deferred shutdown in progress, %s remaining%s",
+             ospf_timer_dump (ospf->t_deferred_shutdown,
                               timebuf, sizeof (timebuf)), VTY_NEWLINE);
   /* Show capability. */
   vty_out (vty, " Supports only single TOS (TOS0) routes%s", VTY_NEWLINE);
index 7c9fb8f05b9c0d07dd711f6069cbfeae95893768..d73d78362489841c460024e749bc95b7993e95e6 100644 (file)
@@ -257,19 +257,19 @@ ospf_get ()
   return ospf;
 }
 \f
-/* Handle the second half of graceful shutdown. This is called either
- * from the graceful-shutdown timer thread, or directly through
- * ospf_graceful_shutdown_check.
+/* Handle the second half of deferred shutdown. This is called either
+ * from the deferred-shutdown timer thread, or directly through
+ * ospf_deferred_shutdown_check.
  *
  * Function is to cleanup G-R state, if required then call ospf_finish_final
  * to complete shutdown of this ospf instance. Possibly exit if the
  * whole process is being shutdown and this was the last OSPF instance.
  */
 static void
-ospf_graceful_shutdown_finish (struct ospf *ospf)
+ospf_deferred_shutdown_finish (struct ospf *ospf)
 {
   ospf->stub_router_shutdown_time = OSPF_STUB_ROUTER_UNCONFIGURED;  
-  OSPF_TIMER_OFF (ospf->t_graceful_shutdown);
+  OSPF_TIMER_OFF (ospf->t_deferred_shutdown);
   
   ospf_finish_final (ospf);
   
@@ -285,27 +285,27 @@ ospf_graceful_shutdown_finish (struct ospf *ospf)
 
 /* Timer thread for G-R */
 static int
-ospf_graceful_shutdown_timer (struct thread *t)
+ospf_deferred_shutdown_timer (struct thread *t)
 {
   struct ospf *ospf = THREAD_ARG(t);
   
-  ospf_graceful_shutdown_finish (ospf);
+  ospf_deferred_shutdown_finish (ospf);
   
   return 0;
 }
 
-/* Check whether graceful-shutdown must be scheduled, otherwise call
+/* Check whether deferred-shutdown must be scheduled, otherwise call
  * down directly into second-half of instance shutdown.
  */
 static void
-ospf_graceful_shutdown_check (struct ospf *ospf)
+ospf_deferred_shutdown_check (struct ospf *ospf)
 {
   unsigned long timeout;
   struct listnode *ln;
   struct ospf_area *area;
   
-  /* graceful shutdown already running? */
-  if (ospf->t_graceful_shutdown)
+  /* deferred shutdown already running? */
+  if (ospf->t_deferred_shutdown)
     return;
   
   /* Should we try push out max-metric LSAs? */
@@ -321,10 +321,13 @@ ospf_graceful_shutdown_check (struct ospf *ospf)
       timeout = ospf->stub_router_shutdown_time;
     }
   else
-    /* No timer needed */
-    return ospf_graceful_shutdown_finish (ospf);
+    {
+      /* No timer needed */
+      ospf_deferred_shutdown_finish (ospf);
+      return;
+    }
   
-  OSPF_TIMER_ON (ospf->t_graceful_shutdown, ospf_graceful_shutdown_timer,
+  OSPF_TIMER_ON (ospf->t_deferred_shutdown, ospf_deferred_shutdown_timer,
                  timeout);
   return;
 }
@@ -354,13 +357,14 @@ ospf_terminate (void)
 void
 ospf_finish (struct ospf *ospf)
 {
-  /* let graceful shutdown decide */
-  return ospf_graceful_shutdown_check (ospf);
+  /* let deferred shutdown decide */
+  ospf_deferred_shutdown_check (ospf);
       
-  /* if ospf_graceful_shutdown returns, then ospf_finish_final is
+  /* if ospf_deferred_shutdown returns, then ospf_finish_final is
    * deferred to expiry of G-S timer thread. Return back up, hopefully
    * to thread scheduler.
    */
+  return;
 }
 
 /* Final cleanup of ospf instance */
index ebacc1b216709e2828212a5d6a0e9faf9108e1d9..f2a610944664b43a7f32176e7306c902f542027a 100644 (file)
@@ -150,7 +150,7 @@ struct ospf_master
 
   /* Various OSPF global configuration. */
   u_char options;
-#define OSPF_MASTER_SHUTDOWN (1 << 0) /* flag for ospf_finish / graceful-shutdown */  
+#define OSPF_MASTER_SHUTDOWN (1 << 0) /* deferred-shutdown */  
 };
 
 /* OSPF instance structure. */
@@ -258,7 +258,7 @@ struct ospf
 #endif /* HAVE_OPAQUE_LSA */
   struct thread *t_maxage;              /* MaxAge LSA remover timer. */
   struct thread *t_maxage_walker;       /* MaxAge LSA checking timer. */
-  struct thread *t_graceful_shutdown;  /* Graceful/stub-router shutdown timer*/
+  struct thread *t_deferred_shutdown;  /* deferred/stub-router shutdown timer*/
 
   struct thread *t_write;
   struct thread *t_read;