mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-27 16:07:15 -07:00
add 'const' qualifiers in various places where they should have been
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+3
-3
@@ -325,11 +325,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
***/
|
||||
|
||||
static const char *app_chan = "ChanSpy";
|
||||
static const char * const app_chan = "ChanSpy";
|
||||
|
||||
static const char *app_ext = "ExtenSpy";
|
||||
static const char * const app_ext = "ExtenSpy";
|
||||
|
||||
static const char *app_dahdiscan = "DAHDIScan";
|
||||
static const char * const app_dahdiscan = "DAHDIScan";
|
||||
|
||||
enum {
|
||||
OPTION_QUIET = (1 << 0), /* Quiet, no announcement */
|
||||
|
||||
@@ -111,7 +111,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
* 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 */
|
||||
|
||||
@@ -92,7 +92,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</description>
|
||||
</application>
|
||||
***/
|
||||
static const char *app = "ControlPlayback";
|
||||
static const char * const app = "ControlPlayback";
|
||||
|
||||
enum {
|
||||
OPT_OFFSET = (1 << 1),
|
||||
|
||||
+1
-1
@@ -1447,7 +1447,7 @@ static int do_privacy(struct ast_channel *chan, struct ast_channel *peer,
|
||||
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",
|
||||
|
||||
@@ -84,8 +84,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</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 */
|
||||
|
||||
@@ -48,10 +48,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/tcptls.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
|
||||
static const char *app = "ExternalIVR";
|
||||
static const char * const app = "ExternalIVR";
|
||||
|
||||
static const char *synopsis = "Interfaces with an external IVR application";
|
||||
static const char *descrip =
|
||||
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"
|
||||
|
||||
+6
-6
@@ -565,12 +565,12 @@ AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS
|
||||
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;
|
||||
|
||||
@@ -125,13 +125,13 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
||||
#define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
|
||||
|
||||
static const char *app = "MixMonitor";
|
||||
static const char * const app = "MixMonitor";
|
||||
|
||||
static const char *stop_app = "StopMixMonitor";
|
||||
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;
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</see-also>
|
||||
</application>
|
||||
***/
|
||||
static const char *app_page= "Page";
|
||||
static const char * const app_page= "Page";
|
||||
|
||||
enum {
|
||||
PAGE_DUPLEX = (1 << 0),
|
||||
|
||||
+2
-2
@@ -90,8 +90,8 @@ static struct ast_config *say_cfg = NULL;
|
||||
* '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)
|
||||
{
|
||||
|
||||
+1
-1
@@ -557,7 +557,7 @@ static char *app_upqm = "UnpauseQueueMember" ;
|
||||
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
|
||||
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
***/
|
||||
|
||||
static const char *app = "SendText";
|
||||
static const char * const app = "SendText";
|
||||
|
||||
static int sendtext_exec(struct ast_channel *chan, void *data)
|
||||
{
|
||||
|
||||
+4
-4
@@ -166,10 +166,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</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);
|
||||
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
</application>
|
||||
***/
|
||||
|
||||
static const char *app = "Transfer";
|
||||
static const char * const app = "Transfer";
|
||||
|
||||
static int transfer_exec(struct ast_channel *chan, void *data)
|
||||
{
|
||||
|
||||
@@ -1419,7 +1419,7 @@ static int create_dirpath(char *dest, int len, const char *context, const char *
|
||||
|
||||
static const char *mbox(int id)
|
||||
{
|
||||
static const char *msgs[] = {
|
||||
static const char * const msgs[] = {
|
||||
#ifdef IMAP_STORAGE
|
||||
imapfolder,
|
||||
#else
|
||||
|
||||
@@ -158,7 +158,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
||||
#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 @@ static int pri_find_dchan(struct dahdi_pri *pri)
|
||||
#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)
|
||||
{
|
||||
|
||||
@@ -3625,7 +3625,7 @@ misdn_overlap_dial_task_disconnect:
|
||||
|
||||
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 */
|
||||
|
||||
@@ -832,7 +832,7 @@ static void handle_mousedown(struct video_desc *env, SDL_MouseButtonEvent button
|
||||
* 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)", "-_", "=+", "[{",
|
||||
"]}", "\\|", ";:", "'\"", ",<", ".>", "/?",
|
||||
|
||||
+1
-1
@@ -413,7 +413,7 @@ static size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *da
|
||||
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)
|
||||
{
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#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 */
|
||||
|
||||
+1
-1
@@ -3678,7 +3678,7 @@ static int load_config(void)
|
||||
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
|
||||
*/
|
||||
|
||||
+1
-1
@@ -8906,7 +8906,7 @@ static int pbx_builtin_execiftime(struct ast_channel *chan, void *data)
|
||||
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);
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ static char prepdata[80] = "";
|
||||
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",
|
||||
|
||||
+2
-2
@@ -1594,8 +1594,8 @@ static struct ast_custom_function odbc_function = {
|
||||
.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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user