From: Joshua Colp Date: Thu, 12 Mar 2009 16:50:37 +0000 (+0000) Subject: Fix another scenario where depending on configuration the stream would not get read. X-Git-Tag: 1.4.25-rc1~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e825bd259c9b4656edfdff33d037e6123d495f5;p=thirdparty%2Fasterisk.git Fix another scenario where depending on configuration the stream would not get read. For custom commands we don't know whether the audio is coming from a stream or not so we are going to have to read the data despite no channels. (closes issue #14416) Reported by: caspy git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181659 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 0f248ded1f..5fe2e4157c 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -557,7 +557,7 @@ static void *monmp3thread(void *data) } res = 8 * MOH_MS_INTERVAL; /* 8 samples per millisecond */ } - if (strncasecmp(class->dir, "http://", 7) && AST_LIST_EMPTY(&class->members)) + if ((strncasecmp(class->dir, "http://", 7) || !strcasecmp(class->dir, "nodir")) && AST_LIST_EMPTY(&class->members)) continue; /* Read mp3 audio */ len = ast_codec_get_len(class->format, res);