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/vty.c | |
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/vty.c')
-rw-r--r-- | lib/vty.c | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -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 |