[asterisk-commits] qwell: trunk r96936 - /trunk/main/config.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 7 15:12:33 CST 2008
Author: qwell
Date: Mon Jan 7 15:12:33 2008
New Revision: 96936
URL: http://svn.digium.com/view/asterisk?view=rev&rev=96936
Log:
Display a message if no config mappings are found with "core show config mappings".
Closes issue #11704, patch by kshumard.
Modified:
trunk/main/config.c
Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?view=diff&rev=96936&r1=96935&r2=96936
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Mon Jan 7 15:12:33 2008
@@ -2249,16 +2249,21 @@
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);
- }
- }
- ast_cli(a->fd,"\n\n");
+ 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_mutex_unlock(&config_lock);
More information about the asterisk-commits
mailing list