[asterisk-commits] kpfleming: trunk r193832 - in /trunk: apps/ channels/ funcs/ main/ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 12 08:59:41 CDT 2009
Author: kpfleming
Date: Tue May 12 08:59:35 2009
New Revision: 193832
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=193832
Log:
add 'const' qualifiers in various places where they should have been
Modified:
trunk/apps/app_chanspy.c
trunk/apps/app_confbridge.c
trunk/apps/app_controlplayback.c
trunk/apps/app_dial.c
trunk/apps/app_directed_pickup.c
trunk/apps/app_externalivr.c
trunk/apps/app_meetme.c
trunk/apps/app_mixmonitor.c
trunk/apps/app_page.c
trunk/apps/app_playback.c
trunk/apps/app_queue.c
trunk/apps/app_sendtext.c
trunk/apps/app_stack.c
trunk/apps/app_transfer.c
trunk/apps/app_voicemail.c
trunk/channels/chan_dahdi.c
trunk/channels/chan_misdn.c
trunk/channels/console_gui.c
trunk/funcs/func_curl.c
trunk/main/devicestate.c
trunk/main/features.c
trunk/main/pbx.c
trunk/main/term.c
trunk/res/res_odbc.c
Modified: trunk/apps/app_chanspy.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Tue May 12 08:59:35 2009
@@ -325,11 +325,11 @@
</application>
***/
-static const char *app_chan = "ChanSpy";
-
-static const char *app_ext = "ExtenSpy";
-
-static const char *app_dahdiscan = "DAHDIScan";
+static const char * const app_chan = "ChanSpy";
+
+static const char * const app_ext = "ExtenSpy";
+
+static const char * const app_dahdiscan = "DAHDIScan";
enum {
OPTION_QUIET = (1 << 0), /* Quiet, no announcement */
Modified: trunk/apps/app_confbridge.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Tue May 12 08:59:35 2009
@@ -111,7 +111,7 @@
* bridge lock if it is important.
*/
-static const char *app = "ConfBridge";
+static const char * const app = "ConfBridge";
enum {
OPTION_ADMIN = (1 << 0), /*!< Set if the caller is an administrator */
Modified: trunk/apps/app_controlplayback.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_controlplayback.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_controlplayback.c (original)
+++ trunk/apps/app_controlplayback.c Tue May 12 08:59:35 2009
@@ -92,7 +92,7 @@
</description>
</application>
***/
-static const char *app = "ControlPlayback";
+static const char * const app = "ControlPlayback";
enum {
OPT_OFFSET = (1 << 1),
Modified: trunk/apps/app_dial.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_dial.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Tue May 12 08:59:35 2009
@@ -1447,7 +1447,7 @@
ast_autoservice_stop(chan);
if (ast_test_flag64(opts, OPT_PRIVACY) && (res2 >= '1' && res2 <= '5')) {
/* map keypresses to various things, the index is res2 - '1' */
- static const char *_val[] = { "ALLOW", "DENY", "TORTURE", "KILL", "ALLOW" };
+ static const char * const _val[] = { "ALLOW", "DENY", "TORTURE", "KILL", "ALLOW" };
static const int _flag[] = { AST_PRIVACY_ALLOW, AST_PRIVACY_DENY, AST_PRIVACY_TORTURE, AST_PRIVACY_KILL, AST_PRIVACY_ALLOW};
int i = res2 - '1';
ast_verb(3, "--Set privacy database entry %s/%s to %s\n",
Modified: trunk/apps/app_directed_pickup.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_directed_pickup.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_directed_pickup.c (original)
+++ trunk/apps/app_directed_pickup.c Tue May 12 08:59:35 2009
@@ -84,8 +84,8 @@
</application>
***/
-static const char *app = "Pickup";
-static const char *app2 = "PickupChan";
+static const char * const app = "Pickup";
+static const char * const app2 = "PickupChan";
/*! \todo This application should return a result code, like PICKUPRESULT */
/* Perform actual pickup between two channels */
Modified: trunk/apps/app_externalivr.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_externalivr.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_externalivr.c (original)
+++ trunk/apps/app_externalivr.c Tue May 12 08:59:35 2009
@@ -48,10 +48,10 @@
#include "asterisk/tcptls.h"
#include "asterisk/astobj2.h"
-static const char *app = "ExternalIVR";
-
-static const char *synopsis = "Interfaces with an external IVR application";
-static const char *descrip =
+static const char * const app = "ExternalIVR";
+
+static const char * const synopsis = "Interfaces with an external IVR application";
+static const char * const descrip =
" ExternalIVR(command|ivr://ivrhosti([,arg[,arg...]])[,options]): Either forks a process\n"
"to run given command or makes a socket to connect to given host and starts\n"
"a generator on the channel. The generator's play list is controlled by the\n"
Modified: trunk/apps/app_meetme.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_meetme.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Tue May 12 08:59:35 2009
@@ -565,12 +565,12 @@
AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
END_OPTIONS );
-static const char *app = "MeetMe";
-static const char *app2 = "MeetMeCount";
-static const char *app3 = "MeetMeAdmin";
-static const char *app4 = "MeetMeChannelAdmin";
-static const char *slastation_app = "SLAStation";
-static const char *slatrunk_app = "SLATrunk";
+static const char * const app = "MeetMe";
+static const char * const app2 = "MeetMeCount";
+static const char * const app3 = "MeetMeAdmin";
+static const char * const app4 = "MeetMeChannelAdmin";
+static const char * const slastation_app = "SLAStation";
+static const char * const slatrunk_app = "SLATrunk";
/* Lookup RealTime conferences based on confno and current time */
static int rt_schedule;
Modified: trunk/apps/app_mixmonitor.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_mixmonitor.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_mixmonitor.c (original)
+++ trunk/apps/app_mixmonitor.c Tue May 12 08:59:35 2009
@@ -125,13 +125,13 @@
#define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
-static const char *app = "MixMonitor";
-
-static const char *stop_app = "StopMixMonitor";
+static const char * const app = "MixMonitor";
+
+static const char * const stop_app = "StopMixMonitor";
struct module_symbols *me;
-static const char *mixmonitor_spy_type = "MixMonitor";
+static const char * const mixmonitor_spy_type = "MixMonitor";
struct mixmonitor {
struct ast_audiohook audiohook;
Modified: trunk/apps/app_page.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_page.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_page.c (original)
+++ trunk/apps/app_page.c Tue May 12 08:59:35 2009
@@ -99,7 +99,7 @@
</see-also>
</application>
***/
-static const char *app_page= "Page";
+static const char * const app_page= "Page";
enum {
PAGE_DUPLEX = (1 << 0),
Modified: trunk/apps/app_playback.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_playback.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_playback.c (original)
+++ trunk/apps/app_playback.c Tue May 12 08:59:35 2009
@@ -90,8 +90,8 @@
* 'say load [new|old]' will enable the new or old method, or report status
*/
static const void *say_api_buf[40];
-static const char *say_old = "old";
-static const char *say_new = "new";
+static const char * const say_old = "old";
+static const char * const say_new = "new";
static void save_say_mode(const void *arg)
{
Modified: trunk/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_queue.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue May 12 08:59:35 2009
@@ -557,7 +557,7 @@
static char *app_ql = "QueueLog" ;
/*! \brief Persistent Members astdb family */
-static const char *pm_family = "Queue/PersistentMembers";
+static const char * const pm_family = "Queue/PersistentMembers";
/* The maximum length of each persistent member queue database entry */
#define PM_MAX_LEN 8192
Modified: trunk/apps/app_sendtext.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_sendtext.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_sendtext.c (original)
+++ trunk/apps/app_sendtext.c Tue May 12 08:59:35 2009
@@ -70,7 +70,7 @@
</application>
***/
-static const char *app = "SendText";
+static const char * const app = "SendText";
static int sendtext_exec(struct ast_channel *chan, void *data)
{
Modified: trunk/apps/app_stack.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_stack.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_stack.c (original)
+++ trunk/apps/app_stack.c Tue May 12 08:59:35 2009
@@ -166,10 +166,10 @@
</function>
***/
-static const char *app_gosub = "Gosub";
-static const char *app_gosubif = "GosubIf";
-static const char *app_return = "Return";
-static const char *app_pop = "StackPop";
+static const char * const app_gosub = "Gosub";
+static const char * const app_gosubif = "GosubIf";
+static const char * const app_return = "Return";
+static const char * const app_pop = "StackPop";
static void gosub_free(void *data);
Modified: trunk/apps/app_transfer.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_transfer.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_transfer.c (original)
+++ trunk/apps/app_transfer.c Tue May 12 08:59:35 2009
@@ -72,7 +72,7 @@
</application>
***/
-static const char *app = "Transfer";
+static const char * const app = "Transfer";
static int transfer_exec(struct ast_channel *chan, void *data)
{
Modified: trunk/apps/app_voicemail.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Tue May 12 08:59:35 2009
@@ -1419,7 +1419,7 @@
static const char *mbox(int id)
{
- static const char *msgs[] = {
+ static const char * const msgs[] = {
#ifdef IMAP_STORAGE
imapfolder,
#else
Modified: trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue May 12 08:59:35 2009
@@ -158,7 +158,7 @@
#define SMDI_MD_WAIT_TIMEOUT 1500 /* 1.5 seconds */
-static const char *lbostr[] = {
+static const char * const lbostr[] = {
"0 db (CSU)/0-133 feet (DSX-1)",
"133-266 feet (DSX-1)",
"266-399 feet (DSX-1)",
@@ -4196,7 +4196,7 @@
#endif /* defined(HAVE_PRI) */
#if defined(HAVE_OPENR2)
-static const char *dahdi_accept_r2_call_app = "DAHDIAcceptR2Call";
+static const char * const dahdi_accept_r2_call_app = "DAHDIAcceptR2Call";
static int dahdi_accept_r2_call_exec(struct ast_channel *chan, void *data)
{
Modified: trunk/channels/chan_misdn.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Tue May 12 08:59:35 2009
@@ -3625,7 +3625,7 @@
static void send_digit_to_chan(struct chan_list *cl, char digit)
{
- static const char *dtmf_tones[] = {
+ static const char * const dtmf_tones[] = {
/* *INDENT-OFF* */
"!941+1336/100,!0/100", /* 0 */
"!697+1209/100,!0/100", /* 1 */
Modified: trunk/channels/console_gui.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/console_gui.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/channels/console_gui.c (original)
+++ trunk/channels/console_gui.c Tue May 12 08:59:35 2009
@@ -832,7 +832,7 @@
* use a translation table, below - one line per entry,
* plain, shift, ctrl, ... using the first char as key.
*/
-static const char *us_kbd_map[] = {
+static const char * const us_kbd_map[] = {
"`~", "1!", "2@", "3#", "4$", "5%", "6^",
"7&", "8*", "9(", "0)", "-_", "=+", "[{",
"]}", "\\|", ";:", "'\"", ",<", ".>", "/?",
Modified: trunk/funcs/func_curl.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_curl.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/funcs/func_curl.c (original)
+++ trunk/funcs/func_curl.c Tue May 12 08:59:35 2009
@@ -413,7 +413,7 @@
return realsize;
}
-static const char *global_useragent = "asterisk-libcurl-agent/1.0";
+static const char * const global_useragent = "asterisk-libcurl-agent/1.0";
static int curl_instance_init(void *data)
{
Modified: trunk/main/devicestate.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/devicestate.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/main/devicestate.c (original)
+++ trunk/main/devicestate.c Tue May 12 08:59:35 2009
@@ -128,7 +128,7 @@
#include "asterisk/event.h"
/*! \brief Device state strings for printing */
-static const char *devstatestring[][2] = {
+static const char * const devstatestring[][2] = {
{ /* 0 AST_DEVICE_UNKNOWN */ "Unknown", "UNKNOWN" }, /*!< Valid, but unknown state */
{ /* 1 AST_DEVICE_NOT_INUSE */ "Not in use", "NOT_INUSE" }, /*!< Not used */
{ /* 2 AST_DEVICE IN USE */ "In use", "INUSE" }, /*!< In use */
Modified: trunk/main/features.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/features.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Tue May 12 08:59:35 2009
@@ -3678,7 +3678,7 @@
char old_parking_ext[AST_MAX_EXTENSION];
char old_parking_con[AST_MAX_EXTENSION] = "";
char *ctg;
- static const char *categories[] = {
+ static const char * const categories[] = {
/* Categories in features.conf that are not
* to be parsed as group categories
*/
Modified: trunk/main/pbx.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/pbx.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue May 12 08:59:35 2009
@@ -8906,7 +8906,7 @@
char *s, *appname;
struct ast_timing timing;
struct ast_app *app;
- static const char *usage = "ExecIfTime requires an argument:\n <time range>,<days of week>,<days of month>,<months>[,<timezone>]?<appname>[(<appargs>)]";
+ static const char * const usage = "ExecIfTime requires an argument:\n <time range>,<days of week>,<days of month>,<months>[,<timezone>]?<appname>[(<appargs>)]";
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "%s\n", usage);
Modified: trunk/main/term.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/term.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/main/term.c (original)
+++ trunk/main/term.c Tue May 12 08:59:35 2009
@@ -43,7 +43,7 @@
static char enddata[80] = "";
static char quitdata[80] = "";
-static const char *termpath[] = {
+static const char * const termpath[] = {
"/usr/share/terminfo",
"/usr/local/share/misc/terminfo",
"/usr/lib/terminfo",
Modified: trunk/res/res_odbc.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_odbc.c?view=diff&rev=193832&r1=193831&r2=193832
==============================================================================
--- trunk/res/res_odbc.c (original)
+++ trunk/res/res_odbc.c Tue May 12 08:59:35 2009
@@ -1594,8 +1594,8 @@
.write = acf_transaction_write,
};
-static const char *app_commit = "ODBC_Commit";
-static const char *app_rollback = "ODBC_Rollback";
+static const char * const app_commit = "ODBC_Commit";
+static const char * const app_rollback = "ODBC_Rollback";
static int reload(void)
{
More information about the asterisk-commits
mailing list