From: Russell Bryant Date: Fri, 19 May 2006 03:11:35 +0000 (+0000) Subject: when displaying the list of registered music on hold classes, only show X-Git-Tag: 1.4.0-beta1~1329 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53df01c9cc129968af7f97caf0906e7fcc1e2736;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/trunk@28445 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 33d7e59d67..ef68b3c986 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,"")); + ast_cli(fd, "\tMode: %s\n", S_OR(class->mode, "")); ast_cli(fd, "\tDirectory: %s\n", S_OR(class->dir, "")); if (ast_test_flag(class, MOH_CUSTOM)) ast_cli(fd, "\tApplication: %s\n", S_OR(class->args, "")); - 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);