diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c index b889f96f1da38a3d958db29548879d87de9dcba9..ae302a1e361a323c69d9f11bbbac211df8f27620 100644 --- a/apps/app_adsiprog.c +++ b/apps/app_adsiprog.c @@ -45,7 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/utils.h" #include "asterisk/lock.h" -static char *app = "ADSIProg"; +static const char app[] = "ADSIProg"; /*** DOCUMENTATION <application name="ADSIProg" language="en_US"> @@ -71,7 +71,7 @@ static char *app = "ADSIProg"; struct adsi_event { int id; - char *name; + const char *name; }; static const struct adsi_event events[] = { diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c index c6fa8980b48d21aa5b9fff4e2e7e37d8189f58e4..47e894b1e7f583784d51d2a296fa0b5900d91ec6 100644 --- a/apps/app_alarmreceiver.c +++ b/apps/app_alarmreceiver.c @@ -62,7 +62,7 @@ struct event_node{ typedef struct event_node event_node_t; -static char *app = "AlarmReceiver"; +static const char app[] = "AlarmReceiver"; /*** DOCUMENTATION <application name="AlarmReceiver" language="en_US"> <synopsis> diff --git a/apps/app_amd.c b/apps/app_amd.c index cedd3b67a84997a8ce7b93e03086290eee6a46dc..c5f08aba6394d7d87a2d31777a7b2ac69dea4493 100644 --- a/apps/app_amd.c +++ b/apps/app_amd.c @@ -124,7 +124,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") ***/ -static char *app = "AMD"; +static const char app[] = "AMD"; #define STATE_IN_WORD 1 #define STATE_IN_SILENCE 2 diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c index 19570255c1d0c5a0177765fb19aef87d7eb77ff0..416ea432d627a25b3f0aa00fa9a28164b6ed7131 100644 --- a/apps/app_authenticate.c +++ b/apps/app_authenticate.c @@ -43,7 +43,7 @@ enum { OPT_DATABASE = (1 << 1), OPT_MULTIPLE = (1 << 3), OPT_REMOVE = (1 << 4), -} auth_option_flags; +}; AST_APP_OPTIONS(auth_app_options, { AST_APP_OPTION('a', OPT_ACCOUNT), @@ -53,7 +53,7 @@ AST_APP_OPTIONS(auth_app_options, { }); -static char *app = "Authenticate"; +static const char app[] = "Authenticate"; /*** DOCUMENTATION <application name="Authenticate" language="en_US"> <synopsis> diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c index c7af4af7dc915d8d45845f6e9b60c8308bbb78b6..b1c426af55838db14c50e5a524a262a75e58c195 100644 --- a/apps/app_chanisavail.c +++ b/apps/app_chanisavail.c @@ -41,7 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/app.h" #include "asterisk/devicestate.h" -static char *app = "ChanIsAvail"; +static const char app[] = "ChanIsAvail"; /*** DOCUMENTATION <application name="ChanIsAvail" language="en_US"> diff --git a/apps/app_channelredirect.c b/apps/app_channelredirect.c index 72716219462b8bd6525b330fb8926d0f4a3ab036..57c9234ef3581af546489dc64ea734838cbbfb1a 100644 --- a/apps/app_channelredirect.c +++ b/apps/app_channelredirect.c @@ -60,7 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </description> </application> ***/ -static char *app = "ChannelRedirect"; +static const char app[] = "ChannelRedirect"; static int asyncgoto_exec(struct ast_channel *chan, const char *data) { diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index c3d0f901e1ccf82f7275fcb192328f69302e9db8..2961cc57edafb5a3fecdc8af12fc39ea9e634991 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -325,11 +325,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </application> ***/ -static const char * const app_chan = "ChanSpy"; +static const char app_chan[] = "ChanSpy"; -static const char * const app_ext = "ExtenSpy"; +static const char app_ext[] = "ExtenSpy"; -static const char * const app_dahdiscan = "DAHDIScan"; +static const char app_dahdiscan[] = "DAHDIScan"; enum { OPTION_QUIET = (1 << 0), /* Quiet, no announcement */ @@ -349,7 +349,7 @@ enum { OPTION_DTMF_EXIT = (1 << 14), /* Set DTMF to exit, added for DAHDIScan integration */ OPTION_DTMF_CYCLE = (1 << 15), /* Custom DTMF for cycling next avaliable channel, (default is '*') */ OPTION_DAHDI_SCAN = (1 << 16), /* Scan groups in DAHDIScan mode */ -} chanspy_opt_flags; +}; enum { OPT_ARG_VOLUME = 0, @@ -360,7 +360,7 @@ enum { OPT_ARG_EXIT, OPT_ARG_CYCLE, OPT_ARG_ARRAY_SIZE, -} chanspy_opt_args; +}; AST_APP_OPTIONS(spy_opts, { AST_APP_OPTION('q', OPTION_QUIET), diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index d7a0bad401a56291385eeebad474bab5e5597d50..bb68f365ab4f0a8b3eb33d8cb9b0899f37cdf0ff 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -111,7 +111,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") * bridge lock if it is important. */ -static const char * const app = "ConfBridge"; +static const char app[] = "ConfBridge"; enum { OPTION_ADMIN = (1 << 0), /*!< Set if the caller is an administrator */ diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c index 11a162d58c869b204fdd053536e7c987c3329792..1d6dcec471af3f4129d5dcbb0121c56575efa866 100644 --- a/apps/app_controlplayback.c +++ b/apps/app_controlplayback.c @@ -92,7 +92,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </description> </application> ***/ -static const char * const app = "ControlPlayback"; +static const char app[] = "ControlPlayback"; enum { OPT_OFFSET = (1 << 1), diff --git a/apps/app_dahdibarge.c b/apps/app_dahdibarge.c index 124318115d0452931ab702b5b11947b577d3a875..7034af0d138aeafac9b4b3265d803762cf564458 100644 --- a/apps/app_dahdibarge.c +++ b/apps/app_dahdibarge.c @@ -70,7 +70,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </description> </application> ***/ -static char *app = "DAHDIBarge"; +static const char app[] = "DAHDIBarge"; #define CONF_SIZE 160 diff --git a/apps/app_dahdiras.c b/apps/app_dahdiras.c index 67f434e6f2886e80fc9fe1378b459d919d5fd756..b467b16b8b5ca654bf9bb1b7a1d8902a1c7f3784 100644 --- a/apps/app_dahdiras.c +++ b/apps/app_dahdiras.c @@ -73,7 +73,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") ***/ -static char *app = "DAHDIRAS"; +static const char app[] = "DAHDIRAS"; #define PPP_MAX_ARGS 32 #define PPP_EXEC "/usr/sbin/pppd" diff --git a/apps/app_db.c b/apps/app_db.c index 8171ed2027356cad68b34592190c87dfb5cd40e0..99679e71b022014783d8beb4528d6692d2ce0aaf 100644 --- a/apps/app_db.c +++ b/apps/app_db.c @@ -79,9 +79,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </application> ***/ -/*! \todo XXX Remove this application after 1.4 is relased */ -static char *d_app = "DBdel"; -static char *dt_app = "DBdeltree"; +static const char d_app[] = "DBdel"; +static const char dt_app[] = "DBdeltree"; static int deltree_exec(struct ast_channel *chan, const char *data) { diff --git a/apps/app_dial.c b/apps/app_dial.c index 7ab2b84a1851fa192ccc29efa0f1810f212de245..a9522652bbf8fd588541353a33953579fdfb77a5 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -465,8 +465,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </application> ***/ -static char *app = "Dial"; -static char *rapp = "RetryDial"; +static const char app[] = "Dial"; +static const char rapp[] = "RetryDial"; enum { OPT_ANNOUNCE = (1 << 0), diff --git a/apps/app_dictate.c b/apps/app_dictate.c index d940b67fc8ae36fb08ccf3929214414e2c273e52..816f15a14a2805cc1b8375567710199e69b9f816 100644 --- a/apps/app_dictate.c +++ b/apps/app_dictate.c @@ -55,7 +55,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </application> ***/ -static char *app = "Dictate"; +static const char app[] = "Dictate"; typedef enum { DFLAG_RECORD = (1 << 0), diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c index 2e196a7d8f2a69b9cb651b064c74fe094cec4404..69015a0908a324fef2924d929dc2033d8cd42d31 100644 --- a/apps/app_directed_pickup.c +++ b/apps/app_directed_pickup.c @@ -84,8 +84,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </application> ***/ -static const char * const app = "Pickup"; -static const char * const app2 = "PickupChan"; +static const char app[] = "Pickup"; +static const char app2[] = "PickupChan"; /*! \todo This application should return a result code, like PICKUPRESULT */ /* Perform actual pickup between two channels */ diff --git a/apps/app_directory.c b/apps/app_directory.c index d0172e79ed5f0fdc9fb0707a073da558c5be946e..e1f5fb27b30a0b272aa1651a007a27152959520d 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -113,7 +113,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </application> ***/ -static char *app = "Directory"; +static const char app[] = "Directory"; /* For simplicity, I'm keeping the format compatible with the voicemail config, but i'm open to suggestions for isolating it */ @@ -128,7 +128,7 @@ enum { OPT_LISTBYLASTNAME = (1 << 4), OPT_LISTBYEITHER = OPT_LISTBYFIRSTNAME | OPT_LISTBYLASTNAME, OPT_PAUSE = (1 << 5), -} directory_option_flags; +}; enum { OPT_ARG_FIRSTNAME = 0, diff --git a/apps/app_disa.c b/apps/app_disa.c index b7ca23cfcdaaad66140303a79cf8ccd2634ed8fe..b86b8f634add2071eff85a25e30eae26451c377a 100644 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -110,12 +110,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </see-also> </application> ***/ -static char *app = "DISA"; +static const char app[] = "DISA"; enum { NOANSWER_FLAG = (1 << 0), POUND_TO_END_FLAG = (1 << 1), -} option_flags; +}; AST_APP_OPTIONS(app_opts, { AST_APP_OPTION('n', NOANSWER_FLAG), diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c index 476f2f1fd7c33cdd9ca6e0897c3167432a8ce351..a7b4fc001e5e68e43b5d8976f90a5a889fbd535d 100644 --- a/apps/app_dumpchan.c +++ b/apps/app_dumpchan.c @@ -60,7 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </application> ***/ -static char *app = "DumpChan"; +static const char app[] = "DumpChan"; static int serialize_showchan(struct ast_channel *c, char *buf, size_t size) { diff --git a/apps/app_echo.c b/apps/app_echo.c index dcdebed4614f62988df619e40cfcd79b63745577..ac718b8b95b076579dc91c557cb62143e0ad3a2e 100644 --- a/apps/app_echo.c +++ b/apps/app_echo.c @@ -46,7 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </application> ***/ -static char *app = "Echo"; +static const char app[] = "Echo"; static int echo_exec(struct ast_channel *chan, const char *data) { diff --git a/apps/app_exec.c b/apps/app_exec.c index b840e24b9b68e81eed2a7d7112d8c66a1062bc26..6ffc0bca9913e1ba092a88569d27518350ed2b3a 100644 --- a/apps/app_exec.c +++ b/apps/app_exec.c @@ -125,9 +125,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") * affecting the dialplan. */ -static char *app_exec = "Exec"; -static char *app_tryexec = "TryExec"; -static char *app_execif = "ExecIf"; +static const char app_exec[] = "Exec"; +static const char app_tryexec[] = "TryExec"; +static const char app_execif[] = "ExecIf"; static int exec_exec(struct ast_channel *chan, const char *data) { diff --git a/apps/app_fax.c b/apps/app_fax.c index 6cb18848ee6edaec11832c59ce50d496cd5a77a7..8f98af2e77bcdb03aaa17dde8575c78ce8f06557 100644 --- a/apps/app_fax.c +++ b/apps/app_fax.c @@ -141,8 +141,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") ***/ -static char *app_sndfax_name = "SendFAX"; -static char *app_rcvfax_name = "ReceiveFAX"; +static const char app_sndfax_name[] = "SendFAX"; +static const char app_rcvfax_name[] = "ReceiveFAX"; #define MAX_SAMPLES 240