diff options
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 |