aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-02 22:13:58 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-02 22:13:58 +0000
commit44eb26c16fb66908f75d395e63a16c343c28e00d (patch)
tree34a098ea018bfea9305300662d1b0dfe10a2deb5 /src/audioOutputs
parent69176148bfd4a9a40a8d653997a6f2714d65776b (diff)
downloadmpd-44eb26c16fb66908f75d395e63a16c343c28e00d.tar.gz
mpd-44eb26c16fb66908f75d395e63a16c343c28e00d.tar.xz
mpd-44eb26c16fb66908f75d395e63a16c343c28e00d.zip
new commands: enalbe_device, and disable_device, (maybe these commands should be toggles instead of two seperate commands?)
also, on close device, close the shout connection git-svn-id: https://svn.musicpd.org/mpd/trunk@2485 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audioOutputs')
-rw-r--r--src/audioOutputs/audioOutput_shout.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index 12ef8c968..414fcdfde 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -289,6 +289,10 @@ static void myShout_finishDriver(AudioOutput * audioOutput) {
}
static void myShout_closeDevice(AudioOutput * audioOutput) {
+ ShoutData * sd = (ShoutData *)audioOutput->data;
+
+ myShout_closeShoutConn(sd);
+
audioOutput->open = 0;
}
@@ -376,7 +380,9 @@ static int myShout_openShoutConn(AudioOutput * audioOutput) {
ShoutData * sd = (ShoutData *)audioOutput->data;
time_t t = time(NULL);
- if(t - sd->lastAttempt < CONN_ATTEMPT_INTERVAL) {
+ if(sd->connAttempts!= 0 &&
+ (t - sd->lastAttempt) < CONN_ATTEMPT_INTERVAL)
+ {
return -1;
}