]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixes moh reload breaking custom mode moh classes when the config file is untouched
authorJonathan Rose <jrose@digium.com>
Tue, 28 Jun 2011 15:46:29 +0000 (15:46 +0000)
committerJonathan Rose <jrose@digium.com>
Tue, 28 Jun 2011 15:46:29 +0000 (15:46 +0000)
(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

res/res_musiconhold.c

index 9385b1fa7cc980779c48bf7cdbd41658d4348de1..5d0e381a9ac1615acabe0f3b09148b007ad06ab5 100644 (file)
@@ -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);
        }