From 6e74f69b51f799d730db66af626fbfa22180df6a Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 6 Nov 2007 20:18:49 +0000 Subject: [PATCH] Fix init_classes() so that classes that actually do have files loaded aren't treated as empty, and immediately destroyed ... git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89053 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_musiconhold.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 1680cffea5..b1955825ad 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -1265,7 +1265,7 @@ static int init_classes(int reload) if (!moh->inuse) ast_moh_destroy_one(moh); } else if (moh->total_files) { - if (moh_scan_files(moh)) { + if (moh_scan_files(moh) <= 0) { ast_log(LOG_WARNING, "No files found for class '%s'\n", moh->name); moh->delete = 1; AST_LIST_REMOVE_CURRENT(&mohclasses, list);