diff options
author | paulo <paul@bayleaf.org.uk> | 2010-01-27 11:40:13 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2010-01-27 11:40:13 +0000 |
commit | 6503ce4cef43d8fe4da510fe9c55911c4af296e9 (patch) | |
tree | 39776a6f5c1ee6046aafc0072f92c923840fb9ca /bgpd/bgp_main.c | |
parent | ffb52b1a705814c52d2d1b41c7058897f11b5aa3 (diff) | |
download | quagga-6503ce4cef43d8fe4da510fe9c55911c4af296e9.tar.bz2 quagga-6503ce4cef43d8fe4da510fe9c55911c4af296e9.tar.xz |
Fixed program shutdown. Added peering engine side of TTL changing.
Changed names of peer states. Writed in peering engine side of sending
route_refresh.
Diffstat (limited to 'bgpd/bgp_main.c')
-rw-r--r-- | bgpd/bgp_main.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 2916c70f..e98d841e 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -216,25 +216,9 @@ sigint (void) #endif zlog_notice ("Terminating on signal"); - if (!retain_mode) - { - /* tell the routing engine to send notifies to peers and wait - * for all sessions to be disabled */ - sigterm_enqueue(); - } - else - { - /* ask remaining pthreads to die */ - if (qpthreads_enabled && routing_nexus != NULL) - qpn_terminate(routing_nexus); - - if (qpthreads_enabled && bgp_nexus != NULL) - qpn_terminate(bgp_nexus); - - if (cli_nexus != NULL) - qpn_terminate(cli_nexus); - } - + /* tell the routing engine to send notifies to peers and wait + * for all sessions to be disabled */ + sigterm_enqueue(); } /* SIGUSR1 handler. */ @@ -648,7 +632,7 @@ sighup_action(mqueue_block mqb, mqb_flag_t flag) { if (flag == mqb_action) { - bgp_terminate (0); /* send notfies */ + bgp_terminate (0, 0); /* send notfies */ bgp_reset (); } @@ -669,9 +653,9 @@ sigterm_action(mqueue_block mqb, mqb_flag_t flag) { if (flag == mqb_action) { - /* send notify to all peers, wiat for alll sessions to be disables + /* send notify to all peers, wait for all sessions to be disables * then terminate all pthreads */ - bgp_terminate(1); + bgp_terminate(1, retain_mode); } mqb_free(mqb); |