From: Jonathan Rose Date: Tue, 28 Jun 2011 15:46:29 +0000 (+0000) Subject: Fixes moh reload breaking custom mode moh classes when the config file is untouched X-Git-Tag: 1.8.5-rc1~7^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=256601e45f6d41b0e91a89f5445bdd044d4c0d69;p=thirdparty%2Fasterisk.git Fixes moh reload breaking custom mode moh classes when the config file is untouched (closes issue ASTERISK-17730) Reported by: sdolloff git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@325152 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 9385b1fa7c..5d0e381a9a 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -1123,7 +1123,9 @@ static void moh_rescan_files(void) { i = ao2_iterator_init(mohclasses, 0); while ((c = ao2_iterator_next(&i))) { - moh_scan_files(c); + if (!strcasecmp(c->mode, "files")) { + moh_scan_files(c); + } ao2_ref(c, -1); }