Display a message if no config mappings are found with "core show config mappings".
Closes issue #11704, patch by kshumard. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
19b18414f5
commit
3def286b5b
|
@ -2249,16 +2249,21 @@ static char *handle_cli_core_show_config_mappings(struct ast_cli_entry *e, int c
|
|||
|
||||
ast_mutex_lock(&config_lock);
|
||||
|
||||
ast_cli(a->fd, "\n\n");
|
||||
for (eng = config_engine_list; eng; eng = eng->next) {
|
||||
ast_cli(a->fd, "\nConfig Engine: %s\n", eng->name);
|
||||
for (map = config_maps; map; map = map->next)
|
||||
if (!strcasecmp(map->driver, eng->name)) {
|
||||
ast_cli(a->fd, "===> %s (db=%s, table=%s)\n", map->name, map->database,
|
||||
map->table ? map->table : map->name);
|
||||
if (!config_engine_list) {
|
||||
ast_cli(a->fd, "No config mappings found.\n");
|
||||
} else {
|
||||
ast_cli(a->fd, "\n\n");
|
||||
for (eng = config_engine_list; eng; eng = eng->next) {
|
||||
ast_cli(a->fd, "\nConfig Engine: %s\n", eng->name);
|
||||
for (map = config_maps; map; map = map->next) {
|
||||
if (!strcasecmp(map->driver, eng->name)) {
|
||||
ast_cli(a->fd, "===> %s (db=%s, table=%s)\n", map->name, map->database,
|
||||
map->table ? map->table : map->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
ast_cli(a->fd,"\n\n");
|
||||
}
|
||||
ast_cli(a->fd,"\n\n");
|
||||
|
||||
ast_mutex_unlock(&config_lock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue