aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-06 07:23:32 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-06 07:23:32 +0000
commit8048b9c7182af432df0b85927e96fe6b797be420 (patch)
tree9ca92bfb0f05d9e2693784191062a83ff4cc5373
parent5087e63494d352e19564ec9c35ee09e4d72674bc (diff)
Constify a bunch of the usage strings for CLI commands.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48302 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_iax2.c48
-rw-r--r--channels/chan_sip.c40
-rw-r--r--channels/chan_zap.c20
-rw-r--r--main/asterisk.c26
-rw-r--r--main/cli.c14
5 files changed, 74 insertions, 74 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 45a7693f7..2d5bee5f3 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -9639,109 +9639,109 @@ static struct ast_switch iax2_switch =
matchmore: iax2_matchmore,
};
-static char show_stats_usage[] =
+static const char show_stats_usage[] =
"Usage: iax2 show stats\n"
" Display statistics on IAX channel driver.\n";
-static char set_mtu_usage[] =
+static const char set_mtu_usage[] =
"Usage: iax2 set mtu <value>\n"
" Set the system-wide IAX IP mtu to <value> bytes net or zero to disable.\n"
" Disabling means that the operating system must handle fragmentation of UDP packets\n"
" when the IAX2 trunk packet exceeds the UDP payload size.\n"
" This is substantially below the IP mtu. Try 1240 on ethernets.\n"
" Must be 172 or greater for G.711 samples.\n";
-static char show_cache_usage[] =
+static const char show_cache_usage[] =
"Usage: iax2 show cache\n"
" Display currently cached IAX Dialplan results.\n";
-static char show_peer_usage[] =
+static const char show_peer_usage[] =
"Usage: iax2 show peer <name>\n"
" Display details on specific IAX peer\n";
-static char prune_realtime_usage[] =
+static const char prune_realtime_usage[] =
"Usage: iax2 prune realtime [<peername>|all]\n"
" Prunes object(s) from the cache\n";
-static char iax2_reload_usage[] =
+static const char iax2_reload_usage[] =
"Usage: iax2 reload\n"
" Reloads IAX configuration from iax.conf\n";
-static char show_prov_usage[] =
+static const char show_prov_usage[] =
"Usage: iax2 provision <host> <template> [forced]\n"
" Provisions the given peer or IP address using a template\n"
" matching either 'template' or '*' if the template is not\n"
" found. If 'forced' is specified, even empty provisioning\n"
" fields will be provisioned as empty fields.\n";
-static char show_users_usage[] =
+static const char show_users_usage[] =
"Usage: iax2 show users [like <pattern>]\n"
" Lists all known IAX2 users.\n"
" Optional regular expression pattern is used to filter the user list.\n";
-static char show_channels_usage[] =
+static const char show_channels_usage[] =
"Usage: iax2 show channels\n"
" Lists all currently active IAX channels.\n";
-static char show_netstats_usage[] =
+static const char show_netstats_usage[] =
"Usage: iax2 show netstats\n"
" Lists network status for all currently active IAX channels.\n";
-static char show_threads_usage[] =
+static const char show_threads_usage[] =
"Usage: iax2 show threads\n"
" Lists status of IAX helper threads\n";
-static char show_peers_usage[] =
+static const char show_peers_usage[] =
"Usage: iax2 show peers [registered] [like <pattern>]\n"
" Lists all known IAX2 peers.\n"
" Optional 'registered' argument lists only peers with known addresses.\n"
" Optional regular expression pattern is used to filter the peer list.\n";
-static char show_firmware_usage[] =
+static const char show_firmware_usage[] =
"Usage: iax2 show firmware\n"
" Lists all known IAX firmware images.\n";
-static char show_reg_usage[] =
+static const char show_reg_usage[] =
"Usage: iax2 show registry\n"
" Lists all registration requests and status.\n";
-static char debug_usage[] =
+static const char debug_usage[] =
"Usage: iax2 set debug\n"
" Enables dumping of IAX packets for debugging purposes\n";
-static char no_debug_usage[] =
+static const char no_debug_usage[] =
"Usage: iax2 set debug off\n"
" Disables dumping of IAX packets for debugging purposes\n";
-static char debug_trunk_usage[] =
+static const char debug_trunk_usage[] =
"Usage: iax2 set debug trunk\n"
" Requests current status of IAX trunking\n";
-static char no_debug_trunk_usage[] =
+static const char no_debug_trunk_usage[] =
"Usage: iax2 set debug trunk off\n"
" Requests current status of IAX trunking\n";
-static char debug_jb_usage[] =
+static const char debug_jb_usage[] =
"Usage: iax2 set debug jb\n"
" Enables jitterbuffer debugging information\n";
-static char no_debug_jb_usage[] =
+static const char no_debug_jb_usage[] =
"Usage: iax2 set debug jb off\n"
" Disables jitterbuffer debugging information\n";
-static char iax2_test_losspct_usage[] =
+static const char iax2_test_losspct_usage[] =
"Usage: iax2 test losspct <percentage>\n"
" For testing, throws away <percentage> percent of incoming packets\n";
#ifdef IAXTESTS
-static char iax2_test_late_usage[] =
+static const char iax2_test_late_usage[] =
"Usage: iax2 test late <ms>\n"
" For testing, count the next frame as <ms> ms late\n";
-static char iax2_test_resync_usage[] =
+static const char iax2_test_resync_usage[] =
"Usage: iax2 test resync <ms>\n"
" For testing, adjust all future frames by <ms> ms\n";
-static char iax2_test_jitter_usage[] =
+static const char iax2_test_jitter_usage[] =
"Usage: iax2 test jitter <ms> <pct>\n"
" For testing, simulate maximum jitter of +/- <ms> on <pct> percentage of packets. If <pct> is not specified, adds jitter to all packets.\n";
#endif /* IAXTESTS */
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d7cc825b0..e0b4da412 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11302,63 +11302,63 @@ static int build_reply_digest(struct sip_pvt *p, int method, char* digest, int d
return 0;
}
-static char show_domains_usage[] =
+static const char show_domains_usage[] =
"Usage: sip show domains\n"
" Lists all configured SIP local domains.\n"
" Asterisk only responds to SIP messages to local domains.\n";
-static char notify_usage[] =
+static const char notify_usage[] =
"Usage: sip notify <type> <peer> [<peer>...]\n"
" Send a NOTIFY message to a SIP peer or peers\n"
" Message types are defined in sip_notify.conf\n";
-static char show_users_usage[] =
+static const char show_users_usage[] =
"Usage: sip show users [like <pattern>]\n"
" Lists all known SIP users.\n"
" Optional regular expression pattern is used to filter the user list.\n";
-static char show_user_usage[] =
+static const char show_user_usage[] =
"Usage: sip show user <name> [load]\n"
" Shows all details on one SIP user and the current status.\n"
" Option \"load\" forces lookup of peer in realtime storage.\n";
-static char show_inuse_usage[] =
+static const char show_inuse_usage[] =
"Usage: sip show inuse [all]\n"
" List all SIP users and peers usage counters and limits.\n"
" Add option \"all\" to show all devices, not only those with a limit.\n";
-static char show_channels_usage[] =
+static const char show_channels_usage[] =
"Usage: sip show channels\n"
" Lists all currently active SIP channels.\n";
-static char show_channel_usage[] =
+static const char show_channel_usage[] =
"Usage: sip show channel <channel>\n"
" Provides detailed status on a given SIP channel.\n";
-static char show_history_usage[] =
+static const char show_history_usage[] =
"Usage: sip show history <channel>\n"
" Provides detailed dialog history on a given SIP channel.\n";
-static char show_peers_usage[] =
+static const char show_peers_usage[] =
"Usage: sip show peers [like <pattern>]\n"
" Lists all known SIP peers.\n"
" Optional regular expression pattern is used to filter the peer list.\n";
-static char show_peer_usage[] =
+static const char show_peer_usage[] =
"Usage: sip show peer <name> [load]\n"
" Shows all details on one SIP peer and the current status.\n"
" Option \"load\" forces lookup of peer in realtime storage.\n";
-static char prune_realtime_usage[] =
+static const char prune_realtime_usage[] =
"Usage: sip prune realtime [peer|user] [<name>|all|like <pattern>]\n"
" Prunes object(s) from the cache.\n"
" Optional regular expression pattern is used to filter the objects.\n";
-static char show_reg_usage[] =
+static const char show_reg_usage[] =
"Usage: sip show registry\n"
" Lists all registration requests and status.\n";
-static char debug_usage[] =
+static const char debug_usage[] =
"Usage: sip debug\n"
" Enables dumping of SIP packets for debugging purposes\n\n"
" sip debug ip <host[:PORT]>\n"
@@ -11367,32 +11367,32 @@ static char debug_usage[] =
" Enables dumping of SIP packets to and from host.\n"
" Require peer to be registered.\n";
-static char no_debug_usage[] =
+static const char no_debug_usage[] =
"Usage: sip debug off\n"
" Disables dumping of SIP packets for debugging purposes\n";
-static char no_history_usage[] =
+static const char no_history_usage[] =
"Usage: sip history off\n"
" Disables recording of SIP dialog history for debugging purposes\n";
-static char history_usage[] =
+static const char history_usage[] =
"Usage: sip history\n"
" Enables recording of SIP dialog history for debugging purposes.\n"
"Use 'sip show history' to view the history of a call number.\n";
-static char sip_reload_usage[] =
+static const char sip_reload_usage[] =
"Usage: sip reload\n"
" Reloads SIP configuration from sip.conf\n";
-static char show_subscriptions_usage[] =
+static const char show_subscriptions_usage[] =
"Usage: sip show subscriptions\n"
" Lists active SIP subscriptions for extension states\n";
-static char show_objects_usage[] =
+static const char show_objects_usage[] =
"Usage: sip show objects\n"
" Lists status of known SIP objects\n";
-static char show_settings_usage[] =
+static const char show_settings_usage[] =
"Usage: sip show settings\n"
" Provides detailed list of the configuration of the SIP channel.\n";
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index c5c935b99..02341fd25 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -10568,23 +10568,23 @@ static int handle_pri_show_debug(int fd, int argc, char *argv[])
return RESULT_SUCCESS;
}
-static char pri_debug_help[] =
+static const char pri_debug_help[] =
"Usage: pri debug span <span>\n"
" Enables debugging on a given PRI span\n";
-static char pri_no_debug_help[] =
+static const char pri_no_debug_help[] =
"Usage: pri no debug span <span>\n"
" Disables debugging on a given PRI span\n";
-static char pri_really_debug_help[] =
+static const char pri_really_debug_help[] =
"Usage: pri intensive debug span <span>\n"
" Enables debugging down to the Q.921 level\n";
-static char pri_show_span_help[] =
+static const char pri_show_span_help[] =
"Usage: pri show span <span>\n"
" Displays PRI Information on a given PRI span\n";
-static char pri_show_spans_help[] =
+static const char pri_show_spans_help[] =
"Usage: pri show spans\n"
" Displays PRI Information\n";
@@ -10990,23 +10990,23 @@ static int zap_show_status(int fd, int argc, char *argv[]) {
#undef FORMAT2
}
-static char show_channels_usage[] =
+static const char show_channels_usage[] =
"Usage: zap show channels\n"
" Shows a list of available channels\n";
-static char show_channel_usage[] =
+static const char show_channel_usage[] =
"Usage: zap show channel <chan num>\n"
" Detailed information about a given channel\n";
-static char zap_show_status_usage[] =
+static const char zap_show_status_usage[] =
"Usage: zap show status\n"
" Shows a list of Zaptel cards with status\n";
-static char destroy_channel_usage[] =
+static const char destroy_channel_usage[] =
"Usage: zap destroy channel <chan num>\n"
" DON'T USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. Immediately removes a given channel, whether it is in use or not\n";
-static char zap_restart_usage[] =
+static const char zap_restart_usage[] =
"Usage: zap restart\n"
" Restarts the zaptel channels: destroys them all and then\n"
" re-reads them from zapata.conf.\n"
diff --git a/main/asterisk.c b/main/asterisk.c
index b29bbd4c9..056f21c8d 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -289,7 +289,7 @@ struct thread_list_t {
static AST_LIST_HEAD_STATIC(thread_list, thread_list_t);
-static char show_threads_help[] =
+static const char show_threads_help[] =
"Usage: core show threads\n"
" List threads currently active in the system.\n";
@@ -483,7 +483,7 @@ static int handle_show_profile(int fd, int argc, char *argv[])
return 0;
}
-static char show_version_files_help[] =
+static const char show_version_files_help[] =
"Usage: core show file version [like <pattern>]\n"
" Lists the revision numbers of the files used to build this copy of Asterisk.\n"
" Optional regular expression pattern is used to filter the file list.\n";
@@ -1296,51 +1296,51 @@ static int remoteconsolehandler(char *s)
return ret;
}
-static char abort_halt_help[] =
+static const char abort_halt_help[] =
"Usage: abort shutdown\n"
" Causes Asterisk to abort an executing shutdown or restart, and resume normal\n"
" call operations.\n";
-static char shutdown_now_help[] =
+static const char shutdown_now_help[] =
"Usage: stop now\n"
" Shuts down a running Asterisk immediately, hanging up all active calls .\n";
-static char shutdown_gracefully_help[] =
+static const char shutdown_gracefully_help[] =
"Usage: stop gracefully\n"
" Causes Asterisk to not accept new calls, and exit when all\n"
" active calls have terminated normally.\n";
-static char shutdown_when_convenient_help[] =
+static const char shutdown_when_convenient_help[] =
"Usage: stop when convenient\n"
" Causes Asterisk to perform a shutdown when all active calls have ended.\n";
-static char restart_now_help[] =
+static const char restart_now_help[] =
"Usage: restart now\n"
" Causes Asterisk to hangup all calls and exec() itself performing a cold\n"
" restart.\n";
-static char restart_gracefully_help[] =
+static const char restart_gracefully_help[] =
"Usage: restart gracefully\n"
" Causes Asterisk to stop accepting new calls and exec() itself performing a cold\n"
" restart when all active calls have ended.\n";
-static char restart_when_convenient_help[] =
+static const char restart_when_convenient_help[] =
"Usage: restart when convenient\n"
" Causes Asterisk to perform a cold restart when all active calls have ended.\n";
-static char bang_help[] =
+static const char bang_help[] =
"Usage: !<command>\n"
" Executes a given shell command\n";
-static char show_warranty_help[] =
+static const char show_warranty_help[] =
"Usage: core show warranty\n"
" Shows the warranty (if any) for this copy of Asterisk.\n";
-static char show_license_help[] =
+static const char show_license_help[] =
"Usage: core show license\n"
" Shows the license(s) for this copy of Asterisk.\n";
-static char version_help[] =
+static const char version_help[] =
"Usage: core show version\n"
" Shows Asterisk version information.\n";
diff --git a/main/cli.c b/main/cli.c
index ae0eaac3d..cd2e40748 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -75,17 +75,17 @@ void ast_cli(int fd, char *fmt, ...)
static AST_LIST_HEAD_STATIC(helpers, ast_cli_entry);
-static char logger_mute_help[] =
+static const char logger_mute_help[] =
"Usage: logger mute\n"
" Disables logging output to the current console, making it possible to\n"
" gather information without being disturbed by scrolling lines.\n";
-static char softhangup_help[] =
+static const char softhangup_help[] =
"Usage: soft hangup <channel>\n"
" Request that a channel be hung up. The hangup takes effect\n"
" the next time the driver reads or writes from the channel\n";
-static char group_show_channels_help[] =
+static const char group_show_channels_help[] =
"Usage: group show channels [pattern]\n"
" Lists all currently active channels with channel group(s) specified.\n"
" Optional regular expression pattern is matched to group names for each\n"
@@ -561,21 +561,21 @@ static char *handle_chanlist(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
#undef VERBOSE_FORMAT_STRING2
}
-static char showchan_help[] =
+static const char showchan_help[] =
"Usage: core show channel <channel>\n"
" Shows lots of information about the specified channel.\n";
-static char commandcomplete_help[] =
+static const char commandcomplete_help[] =
"Usage: _command complete \"<line>\" text state\n"
" This function is used internally to help with command completion and should.\n"
" never be called by the user directly.\n";
-static char commandnummatches_help[] =
+static const char commandnummatches_help[] =
"Usage: _command nummatches \"<line>\" text \n"
" This function is used internally to help with command completion and should.\n"
" never be called by the user directly.\n";
-static char commandmatchesarray_help[] =
+static const char commandmatchesarray_help[] =
"Usage: _command matchesarray \"<line>\" text \n"
" This function is used internally to help with command completion and should.\n"
" never be called by the user directly.\n";