summaryrefslogtreecommitdiff
path: root/ldpd
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-04-19 15:28:43 -0300
committerRenato Westphal <renato@opensourcerouting.org>2017-06-05 12:23:25 -0300
commit30f35e856608b29c7e4f091c7a22f4a3b4019258 (patch)
treebb678c7c4fb1167e85901871c90d6872106a1193 /ldpd
parentb3121cd7d14f28cad53d39d9fbf09b036d3e95c9 (diff)
ldpd: remove unnecessary checks if a signal was caught
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd')
-rw-r--r--ldpd/lde.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c
index 3dfcd8f885..426af8dbe8 100644
--- a/ldpd/lde.c
+++ b/ldpd/lde.c
@@ -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,7 +131,7 @@ 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);
}
/* make socket non-blocking */
sock_set_nonblock(zclient_sync->sock);
@@ -146,7 +139,7 @@ zclient_sync_init(u_short instance)
/* 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);
}
}