diff options
author | Keith Packard <keithp@keithp.com> | 2012-07-17 23:59:13 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-07-17 23:59:13 -0700 |
commit | a698cd68968fc0be5f96b1729cdea2f65d2ccbf6 (patch) | |
tree | d7eac9e8ae5c21986754dcb337887f26f3b6c42a | |
parent | 9fd5e3c28fb0fd6da8641e7dd18b9912866d1b75 (diff) |
altos: Toggling telemetry monitoring would replay the telem queue
Using the 'm' command to turn telem off and back on would end up going
around the whole telemetry queue replaying everything there as the
wait loop would exit when disabling monitoring even if the ring was empty.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/core/ao_monitor.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/ao_monitor.c b/src/core/ao_monitor.c index d492e32a..5876bef7 100644 --- a/src/core/ao_monitor.c +++ b/src/core/ao_monitor.c @@ -132,6 +132,8 @@ ao_monitor_put(void) ao_sleep(DATA_TO_XDATA(&ao_external_monitoring)); while (ao_monitor_tail == ao_monitor_head && ao_external_monitoring) ao_sleep(DATA_TO_XDATA(&ao_monitor_head)); + if (!ao_external_monitoring) + continue; m = &ao_monitor_ring[ao_monitor_tail]; ao_monitor_tail = ao_monitor_ring_next(ao_monitor_tail); switch (ao_monitoring) { |