Merged revisions 325152 via svnmerge from
authorJonathan Rose <jrose@digium.com>
Tue, 28 Jun 2011 16:04:18 +0000 (16:04 +0000)
committerJonathan Rose <jrose@digium.com>
Tue, 28 Jun 2011 16:04:18 +0000 (16:04 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r325152 | jrose | 2011-06-28 10:46:29 -0500 (Tue, 28 Jun 2011) | 5 lines

  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/trunk@325153 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_musiconhold.c

index db7f852..7ed5955 100644 (file)
@@ -1150,7 +1150,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);
        }