Ensure that 'logger show channels' works properly when wildcards are used in logger...
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 10 Jun 2010 12:28:17 +0000 (12:28 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 10 Jun 2010 12:28:17 +0000 (12:28 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269707 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/logger.c

index 53b7bb3..cd7d7a3 100644 (file)
@@ -730,7 +730,7 @@ static char *handle_logger_show_channels(struct ast_cli_entry *e, int cmd, struc
                        chan->disabled ? "Disabled" : "Enabled");
                ast_cli(a->fd, " - ");
                for (level = 0; level < ARRAY_LEN(levels); level++) {
-                       if (chan->logmask & (1 << level)) {
+                       if ((chan->logmask & (1 << level)) && levels[level]) {
                                ast_cli(a->fd, "%s ", levels[level]);
                        }
                }