summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_fsm.c2
-rw-r--r--lib/qpnexus.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index a3d7f651..bd1eb600 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -1531,7 +1531,7 @@ bgp_fsm_event(bgp_connection connection, bgp_fsm_event_t event)
dassert( (event >= bgp_fsm_null_event)
&& (event <= bgp_fsm_last_event)) ;
dassert( (connection->state >= bgp_fsm_first_state)
- && (connection->state >= bgp_fsm_last_state) ) ;
+ && (connection->state <= bgp_fsm_last_state) ) ;
/* Watch out for recursing through the FSM for this connection. */
++connection->fsm_active ;
diff --git a/lib/qpnexus.c b/lib/qpnexus.c
index 270142be..efa81c66 100644
--- a/lib/qpnexus.c
+++ b/lib/qpnexus.c
@@ -241,7 +241,14 @@ qpn_in_thread_init(qpn_nexus qpn)
sigdelset (&newmask, SIGSEGV);
sigdelset (&newmask, SIGBUS);
}
- qpt_thread_sigmask(SIG_BLOCK, &newmask, NULL);
+
+ if (qpthreads_enabled)
+ qpt_thread_sigmask(SIG_BLOCK, &newmask, NULL);
+ else
+ {
+ if (sigprocmask(SIG_BLOCK, &newmask, NULL) != 0)
+ zabort_errno("sigprocmask failed") ;
+ }
/* Now we have thread_id and mask, prep for using message queue. */
if (qpn->queue != NULL)