Newer
Older
static int config_command(int fd, int argc, char **argv)
{
struct ast_config_map *map;
ast_mutex_lock(&config_lock);
ast_cli(fd, "\n\n");
for (eng = config_engine_list; eng; eng = eng->next) {
ast_cli(fd, "\nConfig Engine: %s\n", eng->name);
for (map = config_maps; map; map = map->next)
if (!strcasecmp(map->driver, eng->name)) {
ast_cli(fd, "===> %s (db=%s, table=%s)\n", map->name, map->database,
map->table ? map->table : map->name);
}
static char show_config_help[] =
"Usage: show config mappings\n"
" Shows the filenames to config engines.\n";
static struct ast_cli_entry config_command_struct = {
{ "show", "config", "mappings", NULL }, config_command, "Show Config mappings (file names to config engines)", show_config_help, NULL
return ast_cli_register(&config_command_struct);
}