Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jason Parker
2007-10-22 20:05:18 +00:00
parent 8711a1dba7
commit ebe4050128
64 changed files with 308 additions and 308 deletions

View File

@@ -1734,26 +1734,26 @@ static char *show_license(struct ast_cli_entry *e, int cmd, struct ast_cli_args
#define ASTERISK_PROMPT2 "%s*CLI> "
static struct ast_cli_entry cli_asterisk[] = {
AST_CLI(handle_abort_shutdown, "Cancel a running shutdown"),
AST_CLI(handle_stop_now, "Shut down Asterisk immediately"),
AST_CLI(handle_stop_gracefully, "Gracefully shut down Asterisk"),
AST_CLI(handle_stop_when_convenient, "Shut down Asterisk at empty call volume"),
AST_CLI(handle_restart_now, "Restart Asterisk immediately"),
AST_CLI(handle_restart_gracefully, "Restart Asterisk gracefully"),
AST_CLI(handle_restart_when_convenient, "Restart Asterisk at empty call volume"),
AST_CLI(show_warranty, "Show the warranty (if any) for this copy of Asterisk"),
AST_CLI(show_license, "Show the license(s) for this copy of Asterisk"),
AST_CLI(handle_version, "Display version info"),
AST_CLI(handle_bang, "Execute a shell command"),
AST_CLI_DEFINE(handle_abort_shutdown, "Cancel a running shutdown"),
AST_CLI_DEFINE(handle_stop_now, "Shut down Asterisk immediately"),
AST_CLI_DEFINE(handle_stop_gracefully, "Gracefully shut down Asterisk"),
AST_CLI_DEFINE(handle_stop_when_convenient, "Shut down Asterisk at empty call volume"),
AST_CLI_DEFINE(handle_restart_now, "Restart Asterisk immediately"),
AST_CLI_DEFINE(handle_restart_gracefully, "Restart Asterisk gracefully"),
AST_CLI_DEFINE(handle_restart_when_convenient, "Restart Asterisk at empty call volume"),
AST_CLI_DEFINE(show_warranty, "Show the warranty (if any) for this copy of Asterisk"),
AST_CLI_DEFINE(show_license, "Show the license(s) for this copy of Asterisk"),
AST_CLI_DEFINE(handle_version, "Display version info"),
AST_CLI_DEFINE(handle_bang, "Execute a shell command"),
#if !defined(LOW_MEMORY)
AST_CLI(handle_show_version_files, "List versions of files used to build Asterisk"),
AST_CLI(handle_show_threads, "Show running threads"),
AST_CLI_DEFINE(handle_show_version_files, "List versions of files used to build Asterisk"),
AST_CLI_DEFINE(handle_show_threads, "Show running threads"),
#if defined(HAVE_SYSINFO)
AST_CLI(handle_show_sysinfo, "Show System Information"),
AST_CLI_DEFINE(handle_show_sysinfo, "Show System Information"),
#endif
AST_CLI(handle_show_profile, "Display profiling info"),
AST_CLI(handle_show_settings, "Show some core settings"),
AST_CLI(handle_clear_profile, "Clear profiling info"),
AST_CLI_DEFINE(handle_show_profile, "Display profiling info"),
AST_CLI_DEFINE(handle_show_settings, "Show some core settings"),
AST_CLI_DEFINE(handle_clear_profile, "Clear profiling info"),
#endif /* ! LOW_MEMORY */
};

View File

@@ -459,8 +459,8 @@ static char *handle_memory_show_summary(struct ast_cli_entry *e, int cmd, struct
}
static struct ast_cli_entry cli_memory[] = {
AST_CLI(handle_memory_show, "Display outstanding memory allocations"),
AST_CLI(handle_memory_show_summary, "Summarize outstanding memory allocations"),
AST_CLI_DEFINE(handle_memory_show, "Display outstanding memory allocations"),
AST_CLI_DEFINE(handle_memory_show_summary, "Summarize outstanding memory allocations"),
};
void __ast_mm_init(void)

View File

@@ -715,8 +715,8 @@ static char *handle_astobj2_test(struct ast_cli_entry *e, int cmd, struct ast_cl
}
static struct ast_cli_entry cli_astobj2[] = {
AST_CLI(handle_astobj2_stats, "Print astobj2 statistics"),
AST_CLI(handle_astobj2_test, "Test astobj2"),
AST_CLI_DEFINE(handle_astobj2_stats, "Print astobj2 statistics"),
AST_CLI_DEFINE(handle_astobj2_test, "Test astobj2"),
};
#endif /* AO2_DEBUG */

View File

@@ -1291,8 +1291,8 @@ static char *handle_cli_submit(struct ast_cli_entry *e, int cmd, struct ast_cli_
return CLI_SUCCESS;
}
static struct ast_cli_entry cli_submit = AST_CLI(handle_cli_submit, "Posts all pending batched CDR data");
static struct ast_cli_entry cli_status = AST_CLI(handle_cli_status, "Display the CDR status");
static struct ast_cli_entry cli_submit = AST_CLI_DEFINE(handle_cli_submit, "Posts all pending batched CDR data");
static struct ast_cli_entry cli_status = AST_CLI_DEFINE(handle_cli_status, "Display the CDR status");
static int do_reload(int reload)
{

View File

@@ -316,8 +316,8 @@ static char *handle_cli_core_show_channeltype(struct ast_cli_entry *e, int cmd,
}
static struct ast_cli_entry cli_channel[] = {
AST_CLI(handle_cli_core_show_channeltypes, "List available channel types"),
AST_CLI(handle_cli_core_show_channeltype, "Give more details on that channel type")
AST_CLI_DEFINE(handle_cli_core_show_channeltypes, "List available channel types"),
AST_CLI_DEFINE(handle_cli_core_show_channeltype, "Give more details on that channel type")
};
/*! \brief Checks to see if a channel is needing hang up */

View File

@@ -1108,47 +1108,47 @@ static char *group_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cl
#undef FORMAT_STRING
}
static struct ast_cli_entry cli_debug_channel_deprecated = AST_CLI(handle_debugchan_deprecated, "Enable debugging on channel");
static struct ast_cli_entry cli_module_load_deprecated = AST_CLI(handle_load_deprecated, "Load a module");
static struct ast_cli_entry cli_module_reload_deprecated = AST_CLI(handle_reload_deprecated, "reload modules by name");
static struct ast_cli_entry cli_module_unload_deprecated = AST_CLI(handle_unload_deprecated, "unload modules by name");
static struct ast_cli_entry cli_debug_channel_deprecated = AST_CLI_DEFINE(handle_debugchan_deprecated, "Enable debugging on channel");
static struct ast_cli_entry cli_module_load_deprecated = AST_CLI_DEFINE(handle_load_deprecated, "Load a module");
static struct ast_cli_entry cli_module_reload_deprecated = AST_CLI_DEFINE(handle_reload_deprecated, "reload modules by name");
static struct ast_cli_entry cli_module_unload_deprecated = AST_CLI_DEFINE(handle_unload_deprecated, "unload modules by name");
static char *handle_help(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static struct ast_cli_entry cli_cli[] = {
/* Deprecated, but preferred command is now consolidated (and already has a deprecated command for it). */
AST_CLI(handle_commandcomplete, "Command complete"),
AST_CLI(handle_commandnummatches, "Returns number of command matches"),
AST_CLI(handle_commandmatchesarray, "Returns command matches array"),
AST_CLI_DEFINE(handle_commandcomplete, "Command complete"),
AST_CLI_DEFINE(handle_commandnummatches, "Returns number of command matches"),
AST_CLI_DEFINE(handle_commandmatchesarray, "Returns command matches array"),
AST_CLI(handle_nodebugchan_deprecated, "Disable debugging on channel(s)"),
AST_CLI_DEFINE(handle_nodebugchan_deprecated, "Disable debugging on channel(s)"),
AST_CLI(handle_chanlist, "Display information on channels"),
AST_CLI_DEFINE(handle_chanlist, "Display information on channels"),
AST_CLI(handle_showchan, "Display information on a specific channel"),
AST_CLI_DEFINE(handle_showchan, "Display information on a specific channel"),
AST_CLI(handle_core_set_debug_channel, "Enable/disable debugging on a channel",
AST_CLI_DEFINE(handle_core_set_debug_channel, "Enable/disable debugging on a channel",
.deprecate_cmd = &cli_debug_channel_deprecated),
AST_CLI(handle_verbose, "Set level of debug/verbose chattiness"),
AST_CLI_DEFINE(handle_verbose, "Set level of debug/verbose chattiness"),
AST_CLI(group_show_channels, "Display active channels with group(s)"),
AST_CLI_DEFINE(group_show_channels, "Display active channels with group(s)"),
AST_CLI(handle_help, "Display help list, or specific help on a command"),
AST_CLI_DEFINE(handle_help, "Display help list, or specific help on a command"),
AST_CLI(handle_logger_mute, "Toggle logging output to a console"),
AST_CLI_DEFINE(handle_logger_mute, "Toggle logging output to a console"),
AST_CLI(handle_modlist, "List modules and info"),
AST_CLI_DEFINE(handle_modlist, "List modules and info"),
AST_CLI(handle_load, "Load a module by name", .deprecate_cmd = &cli_module_load_deprecated),
AST_CLI_DEFINE(handle_load, "Load a module by name", .deprecate_cmd = &cli_module_load_deprecated),
AST_CLI(handle_reload, "Reload configuration", .deprecate_cmd = &cli_module_reload_deprecated),
AST_CLI_DEFINE(handle_reload, "Reload configuration", .deprecate_cmd = &cli_module_reload_deprecated),
AST_CLI(handle_unload, "Unload a module by name", .deprecate_cmd = &cli_module_unload_deprecated ),
AST_CLI_DEFINE(handle_unload, "Unload a module by name", .deprecate_cmd = &cli_module_unload_deprecated ),
AST_CLI(handle_showuptime, "Show uptime information"),
AST_CLI_DEFINE(handle_showuptime, "Show uptime information"),
AST_CLI(handle_softhangup, "Request a hangup on a given channel"),
AST_CLI_DEFINE(handle_softhangup, "Request a hangup on a given channel"),
};
/*!

View File

@@ -2178,7 +2178,7 @@ static char *handle_cli_core_show_config_mappings(struct ast_cli_entry *e, int c
}
static struct ast_cli_entry cli_config[] = {
AST_CLI(handle_cli_core_show_config_mappings, "Display config mappings (file names to config engines)"),
AST_CLI_DEFINE(handle_cli_core_show_config_mappings, "Display config mappings (file names to config engines)"),
};
int register_config_cli()

View File

@@ -549,12 +549,12 @@ void ast_db_freetree(struct ast_db_entry *dbe)
}
struct ast_cli_entry cli_database[] = {
AST_CLI(handle_cli_database_show, "Shows database contents"),
AST_CLI(handle_cli_database_showkey, "Shows database contents"),
AST_CLI(handle_cli_database_get, "Gets database value"),
AST_CLI(handle_cli_database_put, "Adds/updates database value"),
AST_CLI(handle_cli_database_del, "Removes database key/value"),
AST_CLI(handle_cli_database_deltree, "Removes database keytree/values")
AST_CLI_DEFINE(handle_cli_database_show, "Shows database contents"),
AST_CLI_DEFINE(handle_cli_database_showkey, "Shows database contents"),
AST_CLI_DEFINE(handle_cli_database_get, "Gets database value"),
AST_CLI_DEFINE(handle_cli_database_put, "Adds/updates database value"),
AST_CLI_DEFINE(handle_cli_database_del, "Removes database key/value"),
AST_CLI_DEFINE(handle_cli_database_deltree, "Removes database keytree/values")
};
static int manager_dbput(struct mansession *s, const struct message *m)

View File

@@ -338,9 +338,9 @@ static char *handle_cli_status(struct ast_cli_entry *e, int cmd, struct ast_cli_
return CLI_SUCCESS;
}
static struct ast_cli_entry cli_reload = AST_CLI(handle_cli_reload, "Reloads the DNS manager configuration");
static struct ast_cli_entry cli_refresh = AST_CLI(handle_cli_refresh, "Performs an immediate refresh");
static struct ast_cli_entry cli_status = AST_CLI(handle_cli_status, "Display the DNS manager status");
static struct ast_cli_entry cli_reload = AST_CLI_DEFINE(handle_cli_reload, "Reloads the DNS manager configuration");
static struct ast_cli_entry cli_refresh = AST_CLI_DEFINE(handle_cli_refresh, "Performs an immediate refresh");
static struct ast_cli_entry cli_status = AST_CLI_DEFINE(handle_cli_status, "Display the DNS manager status");
int dnsmgr_init(void)
{

View File

@@ -1239,7 +1239,7 @@ static char *handle_cli_core_show_file_formats(struct ast_cli_entry *e, int cmd,
}
struct ast_cli_entry cli_file[] = {
AST_CLI(handle_cli_core_show_file_formats, "Displays file formats")
AST_CLI_DEFINE(handle_cli_core_show_file_formats, "Displays file formats")
};
int ast_file_init(void)

View File

@@ -913,10 +913,10 @@ static char *show_frame_stats(struct ast_cli_entry *e, int cmd, struct ast_cli_a
/* Builtin Asterisk CLI-commands for debugging */
static struct ast_cli_entry my_clis[] = {
AST_CLI(show_codecs, "Displays a list of codecs"),
AST_CLI(show_codec_n, "Shows a specific codec"),
AST_CLI_DEFINE(show_codecs, "Displays a list of codecs"),
AST_CLI_DEFINE(show_codec_n, "Shows a specific codec"),
#ifdef TRACE_FRAMES
AST_CLI(show_frame_stats, "Shows frame statistics"),
AST_CLI_DEFINE(show_frame_stats, "Shows frame statistics"),
#endif
};

View File

@@ -1299,7 +1299,7 @@ int ast_http_reload(void)
}
static struct ast_cli_entry cli_http[] = {
AST_CLI(handle_show_http, "Display HTTP server status"),
AST_CLI_DEFINE(handle_show_http, "Display HTTP server status"),
};
int ast_http_init(void)

View File

@@ -211,7 +211,7 @@ static char *handle_core_show_image_formats(struct ast_cli_entry *e, int cmd, st
}
struct ast_cli_entry cli_image[] = {
AST_CLI(handle_core_show_image_formats, "Displays image formats")
AST_CLI_DEFINE(handle_core_show_image_formats, "Displays image formats")
};
int ast_image_init(void)

View File

@@ -708,9 +708,9 @@ struct verb {
static AST_RWLIST_HEAD_STATIC(verbosers, verb);
static struct ast_cli_entry cli_logger[] = {
AST_CLI(handle_logger_show_channels, "List configured log channels"),
AST_CLI(handle_logger_reload, "Reopens the log files"),
AST_CLI(handle_logger_rotate, "Rotates and reopens the log files")
AST_CLI_DEFINE(handle_logger_show_channels, "List configured log channels"),
AST_CLI_DEFINE(handle_logger_reload, "Reopens the log files"),
AST_CLI_DEFINE(handle_logger_rotate, "Rotates and reopens the log files")
};
static int handle_SIGXFSZ(int sig)

View File

@@ -717,13 +717,13 @@ static char *handle_showmaneventq(struct ast_cli_entry *e, int cmd, struct ast_c
}
static struct ast_cli_entry cli_manager[] = {
AST_CLI(handle_showmancmd, "Show a manager interface command"),
AST_CLI(handle_showmancmds, "List manager interface commands"),
AST_CLI(handle_showmanconn, "List connected manager interface users"),
AST_CLI(handle_showmaneventq, "List manager interface queued events"),
AST_CLI(handle_showmanagers, "List configured manager users"),
AST_CLI(handle_showmanager, "Display information on a specific manager user"),
AST_CLI(handle_mandebug, "Show, enable, disable debugging of the manager code"),
AST_CLI_DEFINE(handle_showmancmd, "Show a manager interface command"),
AST_CLI_DEFINE(handle_showmancmds, "List manager interface commands"),
AST_CLI_DEFINE(handle_showmanconn, "List connected manager interface users"),
AST_CLI_DEFINE(handle_showmaneventq, "List manager interface queued events"),
AST_CLI_DEFINE(handle_showmanagers, "List configured manager users"),
AST_CLI_DEFINE(handle_showmanager, "Display information on a specific manager user"),
AST_CLI_DEFINE(handle_mandebug, "Show, enable, disable debugging of the manager code"),
};
/*

View File

@@ -3967,15 +3967,15 @@ static char *handle_set_global(struct ast_cli_entry *e, int cmd, struct ast_cli_
* CLI entries for upper commands ...
*/
static struct ast_cli_entry pbx_cli[] = {
AST_CLI(handle_show_applications, "Shows registered dialplan applications"),
AST_CLI(handle_show_functions, "Shows registered dialplan functions"),
AST_CLI(handle_show_switches, "Show alternative switches"),
AST_CLI(handle_show_hints, "Show dialplan hints"),
AST_CLI(handle_show_globals, "Show global dialplan variables"),
AST_CLI(handle_show_function, "Describe a specific dialplan function"),
AST_CLI(handle_show_application, "Describe a specific dialplan application"),
AST_CLI(handle_set_global, "Set global dialplan variable"),
AST_CLI(handle_show_dialplan, "Show dialplan"),
AST_CLI_DEFINE(handle_show_applications, "Shows registered dialplan applications"),
AST_CLI_DEFINE(handle_show_functions, "Shows registered dialplan functions"),
AST_CLI_DEFINE(handle_show_switches, "Show alternative switches"),
AST_CLI_DEFINE(handle_show_hints, "Show dialplan hints"),
AST_CLI_DEFINE(handle_show_globals, "Show global dialplan variables"),
AST_CLI_DEFINE(handle_show_function, "Describe a specific dialplan function"),
AST_CLI_DEFINE(handle_show_application, "Describe a specific dialplan application"),
AST_CLI_DEFINE(handle_set_global, "Set global dialplan variable"),
AST_CLI_DEFINE(handle_show_dialplan, "Show dialplan"),
};
static void unreference_cached_app(struct ast_app *app)

View File

@@ -3979,10 +3979,10 @@ static char *handle_cli_stun_debug(struct ast_cli_entry *e, int cmd, struct ast_
}
static struct ast_cli_entry cli_rtp[] = {
AST_CLI(handle_cli_rtp_debug, "Enable/Disable RTP debugging"),
AST_CLI(handle_cli_rtcp_debug, "Enable/Disable RTCP debugging"),
AST_CLI(handle_cli_rtcp_stats, "Enable/Disable RTCP stats"),
AST_CLI(handle_cli_stun_debug, "Enable/Disable STUN debugging"),
AST_CLI_DEFINE(handle_cli_rtp_debug, "Enable/Disable RTP debugging"),
AST_CLI_DEFINE(handle_cli_rtcp_debug, "Enable/Disable RTCP debugging"),
AST_CLI_DEFINE(handle_cli_rtcp_stats, "Enable/Disable RTCP stats"),
AST_CLI_DEFINE(handle_cli_stun_debug, "Enable/Disable STUN debugging"),
};
static int __ast_rtp_reload(int reload)

View File

@@ -222,8 +222,8 @@ static char *handle_cli_threadstorage_show_summary(struct ast_cli_entry *e, int
}
static struct ast_cli_entry cli[] = {
AST_CLI(handle_cli_threadstorage_show_allocations, "Display outstanding thread local storage allocations"),
AST_CLI(handle_cli_threadstorage_show_summary, "Summarize outstanding memory allocations")
AST_CLI_DEFINE(handle_cli_threadstorage_show_allocations, "Display outstanding thread local storage allocations"),
AST_CLI_DEFINE(handle_cli_threadstorage_show_summary, "Summarize outstanding memory allocations")
};
void threadstorage_init(void)

View File

@@ -575,7 +575,7 @@ static char *handle_cli_core_show_translation(struct ast_cli_entry *e, int cmd,
}
static struct ast_cli_entry cli_translate[] = {
AST_CLI(handle_cli_core_show_translation, "Display translation matrix")
AST_CLI_DEFINE(handle_cli_core_show_translation, "Display translation matrix")
};
/*! \brief register codec translator */

View File

@@ -1197,9 +1197,9 @@ static char *handle_cli_udptl_debug_off(struct ast_cli_entry *e, int cmd, struct
}
static struct ast_cli_entry cli_udptl[] = {
AST_CLI(handle_cli_udptl_debug, "Enable UDPTL debugging"),
AST_CLI(handle_cli_udptl_debug_ip, "Enable UDPTL debugging on IP"),
AST_CLI(handle_cli_udptl_debug_off, "Disable UDPTL debugging")
AST_CLI_DEFINE(handle_cli_udptl_debug, "Enable UDPTL debugging"),
AST_CLI_DEFINE(handle_cli_udptl_debug_ip, "Enable UDPTL debugging on IP"),
AST_CLI_DEFINE(handle_cli_udptl_debug_off, "Disable UDPTL debugging")
};
static void __ast_udptl_reload(int reload)

View File

@@ -786,7 +786,7 @@ static char *handle_show_locks(struct ast_cli_entry *e, int cmd, struct ast_cli_
}
static struct ast_cli_entry utils_cli[] = {
AST_CLI(handle_show_locks, "Show which locks are held by which thread"),
AST_CLI_DEFINE(handle_show_locks, "Show which locks are held by which thread"),
};
#endif /* DEBUG_THREADS */