summaryrefslogtreecommitdiff
path: root/radio.c
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-01-02 00:16:08 +0100
committerJavier S. Pedro <maemo@javispedro.com>2012-01-02 00:16:08 +0100
commitd858f899525dc40fe684a8ed15f5103ed8d733b7 (patch)
treeb03756277783d55ff5c50c990aeae162225414c6 /radio.c
parent4236fc397aaf1ebc0b0cb375c4b9e02d50aec604 (diff)
downloadfmrxd-d858f899525dc40fe684a8ed15f5103ed8d733b7.tar.gz
fmrxd-d858f899525dc40fe684a8ed15f5103ed8d733b7.zip
move to system d-bus
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);
}