aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-31 01:16:48 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-31 01:16:48 +0000
commite998fca04981a0afbb4d4417af1579667ecf4437 (patch)
tree0bbacc43bbacf018690ff47c0de57902e121a6cf
parent226945ec6ad84aecb8c8f2e2ef7b78c0ef675aef (diff)
ensure that the MOH_QUIET flag gets set for the mode "quietmp3nb"
add mode to the output of the "moh classes show" cli command git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6463 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xres/res_musiconhold.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 9dcb429a0..a964717d6 100755
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -799,9 +799,11 @@ static int moh_register(struct mohclass *moh)
if (!strcasecmp(moh->mode, "custom"))
ast_set_flag(moh, MOH_CUSTOM);
- else if (!strcasecmp(moh->mode, "mp3nb") || !strcasecmp(moh->mode, "quietmp3nb"))
+ else if (!strcasecmp(moh->mode, "mp3nb"))
ast_set_flag(moh, MOH_SINGLE);
- else if (!strcasecmp(moh->mode, "quietmp3") || !strcasecmp(moh->mode, "quietmp3nb"))
+ else if (!strcasecmp(moh->mode, "quietmp3nb"))
+ ast_set_flag(moh, MOH_SINGLE | MOH_QUIET);
+ else if (!strcasecmp(moh->mode, "quietmp3"))
ast_set_flag(moh, MOH_QUIET);
moh->srcfd = -1;
@@ -1119,6 +1121,7 @@ static int moh_classes_show(int fd, int argc, char *argv[])
ast_mutex_lock(&moh_lock);
for (class = mohclasses; class; class = class->next) {
ast_cli(fd, "Class: %s\n", class->name);
+ ast_cli(fd, "\tMode: %s\n", ast_strlen_zero(class->mode) ? "<none>" : class->mode);
ast_cli(fd, "\tDirectory: %s\n", ast_strlen_zero(class->dir) ? "<none>" : class->dir);
if (ast_test_flag(class, MOH_CUSTOM))
ast_cli(fd, "\tApplication: %s\n", ast_strlen_zero(class->args) ? "<none>" : class->args);