From 8cb147764b3b379f0ecd2efb69e6c200ecfbef7c Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Mon, 1 Nov 2004 13:21:10 +0000 Subject: bad shank, don't set ao->open in openShoutConn(), bad shank this should fix a few bugs, possibly the memory leak git-svn-id: https://svn.musicpd.org/mpd/trunk@2442 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/audioOutput_shout.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/audioOutput_shout.c b/src/audioOutput_shout.c index 2885ef594..f27c56e4f 100644 --- a/src/audioOutput_shout.c +++ b/src/audioOutput_shout.c @@ -364,13 +364,11 @@ static int shout_openShoutConn(AudioOutput * audioOutput) { ERROR("problem opening connection to shout server: %s\n", shout_get_error(sd->shoutConn)); - audioOutput->open = 0; return -1; } if(initEncoder(sd) < 0) { shout_close(sd->shoutConn); - audioOutput->open = 0; return -1; } @@ -414,7 +412,12 @@ static int shout_openDevice(AudioOutput * audioOutput, if(sd->opened) return 0; - return shout_openShoutConn(audioOutput); + if(shout_openShoutConn(audioOutput) < 0) { + audioOutput->open = 1; + return -1; + } + + return 0; } static void shout_convertAudioFormat(ShoutData * sd, char ** chunkArgPtr, -- cgit v1.2.3