summaryrefslogtreecommitdiff
path: root/radio.c
diff options
context:
space:
mode:
Diffstat (limited to 'radio.c')
-rw-r--r--radio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/radio.c b/radio.c
index bc0d5ea..7b53fba 100644
--- a/radio.c
+++ b/radio.c
@@ -79,7 +79,7 @@ void radio_queue_start()
/* If there was a queued stop pending, remove it. */
g_source_remove(stop_source_id);
}
- if (!start_source_id) {
+ if (!radio_active() && !start_source_id) {
start_source_id = g_idle_add(radio_start_func, NULL);
}
}
@@ -90,7 +90,7 @@ void radio_queue_stop()
/* If there is a queued start, remove it. */
g_source_remove(start_source_id);
}
- if (!stop_source_id) {
+ if (radio_active() && !stop_source_id) {
stop_source_id = g_timeout_add_seconds(RADIO_LINGER_TIME,
radio_stop_func, NULL);
}