diff options
author | paulo <paul@bayleaf.org.uk> | 2010-01-22 18:04:18 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2010-01-22 18:04:18 +0000 |
commit | eeda1184fa60c5077c2d404d0a8415d11e836ccd (patch) | |
tree | 2fbf5caf7362cfb47d2a84cdacac0283ec77aa72 /lib | |
parent | 27d6ee80efd93c2f82de06787483630756164605 (diff) | |
download | quagga-eeda1184fa60c5077c2d404d0a8415d11e836ccd.tar.bz2 quagga-eeda1184fa60c5077c2d404d0a8415d11e836ccd.tar.xz |
Fix "write file" command so reports "threaded". Working on Shutdown and
HUP. Shutdown needs mechanism to know when bgp_engine has closed
everything. HUP don't understand how it is supposed to cope with added/
deleted/retained peers and get them going again.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/command.c | 3 | ||||
-rw-r--r-- | lib/qpnexus.c | 3 | ||||
-rw-r--r-- | lib/vty.c | 20 |
3 files changed, 17 insertions, 9 deletions
diff --git a/lib/command.c b/lib/command.c index 59cbbe52..2c9ca64a 100644 --- a/lib/command.c +++ b/lib/command.c @@ -536,6 +536,9 @@ zencrypt (const char *passwd) static int config_write_host (struct vty *vty) { + if (qpthreads_enabled) + vty_out (vty, "threaded%s", VTY_NEWLINE); + if (host.name) vty_out (vty, "hostname %s%s", host.name, VTY_NEWLINE); diff --git a/lib/qpnexus.c b/lib/qpnexus.c index 731190b6..5a243d0f 100644 --- a/lib/qpnexus.c +++ b/lib/qpnexus.c @@ -264,5 +264,6 @@ qpn_terminate(qpn_nexus qpn) { qpn->terminate = 1; /* wake up any pselect */ - qpt_thread_signal(qpn->thread_id, SIGMQUEUE); + if (qpthreads_enabled) + qpt_thread_signal(qpn->thread_id, SIGMQUEUE); } @@ -603,7 +603,8 @@ vty_queued_result(struct vty *vty, int result) if (cli_nexus) { vty_event (VTY_WRITE, vty->fd, vty); - qpt_thread_signal(cli_nexus->thread_id, SIGMQUEUE); + if (qpthreads_enabled) + qpt_thread_signal(cli_nexus->thread_id, SIGMQUEUE); } UNLOCK @@ -2901,15 +2902,18 @@ vty_goodbye (void) if (vtyvec) { for (i = 0; i < vector_active (vtyvec); i++) - if (((vty = vector_slot (vtyvec, i)) != NULL) && vty->type == VTY_TERM) - uty_out(vty, QUAGGA_PROGNAME " is shutting down%s", VTY_NEWLINE); - - /* Wake up */ - if (cli_nexus) { - vty_event (VTY_WRITE, vty->fd, vty); - qpt_thread_signal(cli_nexus->thread_id, SIGMQUEUE); + if (((vty = vector_slot (vtyvec, i)) != NULL) && vty->type == VTY_TERM) + { + uty_out(vty, QUAGGA_PROGNAME " is shutting down%s", VTY_NEWLINE); + + /* Wake up */ + if (cli_nexus) + vty_event (VTY_WRITE, vty->fd, vty); + } } + if (qpthreads_enabled) + qpt_thread_signal(cli_nexus->thread_id, SIGMQUEUE); } UNLOCK |