diff options
author | paulo <paul@bayleaf.org.uk> | 2010-01-20 13:09:35 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2010-01-20 13:09:35 +0000 |
commit | 13fad04d09978db15317d3d3fb71ab87ea52c110 (patch) | |
tree | dca03d21ec9517db4ee837873e6d54736ea20286 /lib/qpnexus.c | |
parent | 5b8978176cbefe7c38f3ed72fd863e2e313d86d8 (diff) | |
download | quagga-13fad04d09978db15317d3d3fb71ab87ea52c110.tar.bz2 quagga-13fad04d09978db15317d3d3fb71ab87ea52c110.tar.xz |
Fix bug in bgp_connection not clearing pointers after free. Planted
asserts to try to track timer crash.
Diffstat (limited to 'lib/qpnexus.c')
-rw-r--r-- | lib/qpnexus.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/qpnexus.c b/lib/qpnexus.c index efa81c66..a350a274 100644 --- a/lib/qpnexus.c +++ b/lib/qpnexus.c @@ -153,14 +153,15 @@ qpn_start(void* arg) while (!qpn->terminate) { + now = qt_get_monotonic(); + /* Signals are highest priority. * only execute on the main thread */ if (qpn->main_thread) quagga_sigevent_process (); /* max time to wait in pselect */ - now = qt_get_monotonic(); - max_wait = now + QTIME(MAX_PSELECT_TIMOUT); + max_wait = QTIME(MAX_PSELECT_TIMOUT); /* event hooks, if any */ for (i = 0; i < NUM_EVENT_HOOK; ++i) @@ -185,8 +186,8 @@ qpn_start(void* arg) } /* block for some input, output, signal or timeout */ - actions = qps_pselect(qpn->selection, - qtimer_pile_top_time(qpn->pile, max_wait)); + actions = qps_pselect(qpn->selection, + qtimer_pile_top_time(qpn->pile, now + max_wait)); /* process I/O actions */ while (actions) @@ -195,7 +196,6 @@ qpn_start(void* arg) mqueue_done_waiting(qpn->queue, qpn->mts); /* process timers */ - now = qt_get_monotonic(); while (qtimer_pile_dispatch_next(qpn->pile, now)) { } |