aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-19 03:11:35 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-19 03:11:35 +0000
commit882e6a716fb3e679d5de9d4864f427fe9737c235 (patch)
tree819a67a1a25c0709becb1486636b6278863983b2 /res/res_musiconhold.c
parentc07b27172b63d2271515d6043d7fc76ee70ba0d6 (diff)
when displaying the list of registered music on hold classes, only show
the format if the mode is not "files", because the field has no meaning in that case git-svn-id: http://svn.digium.com/svn/asterisk/trunk@28445 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 33d7e59d6..ef68b3c98 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1133,11 +1133,12 @@ static int moh_classes_show(int fd, int argc, char *argv[])
AST_LIST_LOCK(&mohclasses);
AST_LIST_TRAVERSE(&mohclasses, class, list) {
ast_cli(fd, "Class: %s\n", class->name);
- ast_cli(fd, "\tMode: %s\n", S_OR(class->mode,"<none>"));
+ ast_cli(fd, "\tMode: %s\n", S_OR(class->mode, "<none>"));
ast_cli(fd, "\tDirectory: %s\n", S_OR(class->dir, "<none>"));
if (ast_test_flag(class, MOH_CUSTOM))
ast_cli(fd, "\tApplication: %s\n", S_OR(class->args, "<none>"));
- ast_cli(fd, "\tFormat: %s\n", ast_getformatname(class->format));
+ if (strcasecmp(class->mode, "files"))
+ ast_cli(fd, "\tFormat: %s\n", ast_getformatname(class->format));
}
AST_LIST_UNLOCK(&mohclasses);