]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ldpd: remove unnecessary checks if a signal was caught
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 19 Apr 2017 18:28:43 +0000 (15:28 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 26 Apr 2017 13:36:33 +0000 (10:36 -0300)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ldpd/lde.c

index 24b993f0945a64e6f7076125a3627be7eb8a4ec9..1c2d681dc7b5313a2d6346250891ef258f460daf 100644 (file)
@@ -119,13 +119,6 @@ static struct quagga_signal_t lde_signals[] =
        },
 };
 
-static void
-lde_sleep (void)
-{
-       sleep(1);
-       if (lde_signals[0].caught || lde_signals[1].caught)
-               lde_shutdown();
-}
 struct zclient *zclient_sync = NULL;
 static void
 zclient_sync_init(u_short instance)
@@ -138,13 +131,13 @@ zclient_sync_init(u_short instance)
        zclient_sync->instance = instance;
        while (zclient_socket_connect (zclient_sync) < 0) {
                fprintf(stderr, "Error connecting synchronous zclient!\n");
-               lde_sleep();
+               sleep(1);
        }
 
        /* Connect to label manager */
        while (lm_label_manager_connect (zclient_sync) != 0) {
                fprintf(stderr, "Error connecting to label manager!\n");
-               lde_sleep();
+               sleep(1);
        }
 }
 
@@ -1628,7 +1621,7 @@ lde_label_list_init(void)
        /* get first chunk */
        while (lde_get_label_chunk () != 0) {
                fprintf(stderr, "Error getting first label chunk!\n");
-               lde_sleep();
+               sleep(1);
        }
 }