dect
/
asterisk
Archived
13
0
Fork 0

Const-ify the world (or at least a good part of it)

This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
kpfleming 2009-05-21 21:13:09 +00:00
parent d57c20e50d
commit 230a66da7d
145 changed files with 802 additions and 806 deletions

View File

@ -74,7 +74,7 @@ struct adsi_event {
char *name;
};
static struct adsi_event events[] = {
static const struct adsi_event events[] = {
{ 1, "CALLERID" },
{ 2, "VMWI" },
{ 3, "NEARANSWER" },
@ -101,7 +101,7 @@ static struct adsi_event events[] = {
{ 24, "CPEID" },
};
static struct adsi_event justify[] = {
static const struct adsi_event justify[] = {
{ 0, "CENTER" },
{ 1, "RIGHT" },
{ 2, "LEFT" },
@ -232,7 +232,7 @@ static int process_token(void *out, char *src, int maxlen, int argtype)
return 0;
}
static char *get_token(char **buf, char *script, int lineno)
static char *get_token(char **buf, const char *script, int lineno)
{
char *tmp = *buf, *keyword;
int quoted = 0;
@ -264,7 +264,7 @@ static char *get_token(char **buf, char *script, int lineno)
static char *validdtmf = "123456789*0#ABCD";
static int send_dtmf(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int send_dtmf(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char dtmfstr[80], *a;
int bytes = 0;
@ -294,7 +294,7 @@ static int send_dtmf(char *buf, char *name, int id, char *args, struct adsi_scri
return bytes;
}
static int goto_line(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int goto_line(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char *page = get_token(&args, script, lineno);
char *gline = get_token(&args, script, lineno);
@ -327,7 +327,7 @@ static int goto_line(char *buf, char *name, int id, char *args, struct adsi_scri
return 2;
}
static int goto_line_rel(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int goto_line_rel(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char *dir = get_token(&args, script, lineno);
char *gline = get_token(&args, script, lineno);
@ -360,7 +360,7 @@ static int goto_line_rel(char *buf, char *name, int id, char *args, struct adsi_
return 2;
}
static int send_delay(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int send_delay(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char *gtime = get_token(&args, script, lineno);
int ms;
@ -385,7 +385,7 @@ static int send_delay(char *buf, char *name, int id, char *args, struct adsi_scr
return 2;
}
static int set_state(char *buf, char *name, int id, char *args, struct adsi_script *istate, char *script, int lineno)
static int set_state(char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno)
{
char *gstate = get_token(&args, script, lineno);
int state;
@ -406,7 +406,7 @@ static int set_state(char *buf, char *name, int id, char *args, struct adsi_scri
return 2;
}
static int cleartimer(char *buf, char *name, int id, char *args, struct adsi_script *istate, char *script, int lineno)
static int cleartimer(char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
@ -424,7 +424,7 @@ static int cleartimer(char *buf, char *name, int id, char *args, struct adsi_scr
return 2;
}
static struct adsi_flag *getflagbyname(struct adsi_script *state, char *name, char *script, int lineno, int create)
static struct adsi_flag *getflagbyname(struct adsi_script *state, char *name, const char *script, int lineno, int create)
{
int x;
@ -449,7 +449,7 @@ static struct adsi_flag *getflagbyname(struct adsi_script *state, char *name, ch
return &state->flags[state->numflags-1];
}
static int setflag(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int setflag(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
char sname[80];
@ -476,7 +476,7 @@ static int setflag(char *buf, char *name, int id, char *args, struct adsi_script
return 2;
}
static int clearflag(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int clearflag(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
struct adsi_flag *flag;
@ -503,7 +503,7 @@ static int clearflag(char *buf, char *name, int id, char *args, struct adsi_scri
return 2;
}
static int starttimer(char *buf, char *name, int id, char *args, struct adsi_script *istate, char *script, int lineno)
static int starttimer(char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
int secs;
@ -549,7 +549,7 @@ static int getjustifybyname(char *name)
return -1;
}
static struct adsi_soft_key *getkeybyname(struct adsi_script *state, char *name, char *script, int lineno)
static struct adsi_soft_key *getkeybyname(struct adsi_script *state, char *name, const char *script, int lineno)
{
int x;
@ -570,7 +570,7 @@ static struct adsi_soft_key *getkeybyname(struct adsi_script *state, char *name,
return &state->keys[state->numkeys-1];
}
static struct adsi_subscript *getsubbyname(struct adsi_script *state, char *name, char *script, int lineno)
static struct adsi_subscript *getsubbyname(struct adsi_script *state, char *name, const char *script, int lineno)
{
int x;
@ -591,7 +591,7 @@ static struct adsi_subscript *getsubbyname(struct adsi_script *state, char *name
return &state->subs[state->numsubs-1];
}
static struct adsi_state *getstatebyname(struct adsi_script *state, char *name, char *script, int lineno, int create)
static struct adsi_state *getstatebyname(struct adsi_script *state, char *name, const char *script, int lineno, int create)
{
int x;
@ -616,7 +616,7 @@ static struct adsi_state *getstatebyname(struct adsi_script *state, char *name,
return &state->states[state->numstates-1];
}
static struct adsi_display *getdisplaybyname(struct adsi_script *state, char *name, char *script, int lineno, int create)
static struct adsi_display *getdisplaybyname(struct adsi_script *state, char *name, const char *script, int lineno, int create)
{
int x;
@ -641,7 +641,7 @@ static struct adsi_display *getdisplaybyname(struct adsi_script *state, char *na
return &state->displays[state->numdisplays-1];
}
static int showkeys(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int showkeys(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char *tok, newkey[80];
int bytes, x, flagid = 0;
@ -688,7 +688,7 @@ static int showkeys(char *buf, char *name, int id, char *args, struct adsi_scrip
return 2 + x;
}
static int showdisplay(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int showdisplay(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char *tok, dispname[80];
int line = 0, flag = 0, cmd = 3;
@ -739,7 +739,7 @@ static int showdisplay(char *buf, char *name, int id, char *args, struct adsi_sc
return 3;
}
static int cleardisplay(char *buf, char *name, int id, char *args, struct adsi_script *istate, char *script, int lineno)
static int cleardisplay(char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
@ -751,7 +751,7 @@ static int cleardisplay(char *buf, char *name, int id, char *args, struct adsi_s
return 2;
}
static int digitdirect(char *buf, char *name, int id, char *args, struct adsi_script *istate, char *script, int lineno)
static int digitdirect(char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
@ -763,7 +763,7 @@ static int digitdirect(char *buf, char *name, int id, char *args, struct adsi_sc
return 2;
}
static int clearcbone(char *buf, char *name, int id, char *args, struct adsi_script *istate, char *script, int lineno)
static int clearcbone(char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
@ -775,7 +775,7 @@ static int clearcbone(char *buf, char *name, int id, char *args, struct adsi_scr
return 2;
}
static int digitcollect(char *buf, char *name, int id, char *args, struct adsi_script *istate, char *script, int lineno)
static int digitcollect(char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
@ -787,7 +787,7 @@ static int digitcollect(char *buf, char *name, int id, char *args, struct adsi_s
return 2;
}
static int subscript(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int subscript(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
char subscr[80];
@ -812,7 +812,7 @@ static int subscript(char *buf, char *name, int id, char *args, struct adsi_scri
return 2;
}
static int onevent(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
static int onevent(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno)
{
char *tok = get_token(&args, script, lineno);
char subscr[80], sname[80];
@ -879,10 +879,10 @@ static int onevent(char *buf, char *name, int id, char *args, struct adsi_script
struct adsi_key_cmd {
char *name;
int id;
int (*add_args)(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno);
int (*add_args)(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno);
};
static struct adsi_key_cmd kcmds[] = {
static const struct adsi_key_cmd kcmds[] = {
{ "SENDDTMF", 0, send_dtmf },
/* Encoded DTMF would go here */
{ "ONHOOK", 0x81 },
@ -924,7 +924,7 @@ static struct adsi_key_cmd kcmds[] = {
{ "EXIT", 0xa0 },
};
static struct adsi_key_cmd opcmds[] = {
static const struct adsi_key_cmd opcmds[] = {
/* 1 - Branch on event -- handled specially */
{ "SHOWKEYS", 2, showkeys },
@ -944,7 +944,7 @@ static struct adsi_key_cmd opcmds[] = {
};
static int process_returncode(struct adsi_soft_key *key, char *code, char *args, struct adsi_script *state, char *script, int lineno)
static int process_returncode(struct adsi_soft_key *key, char *code, char *args, struct adsi_script *state, const char *script, int lineno)
{
int x, res;
char *unused;
@ -973,7 +973,7 @@ static int process_returncode(struct adsi_soft_key *key, char *code, char *args,
return -1;
}
static int process_opcode(struct adsi_subscript *sub, char *code, char *args, struct adsi_script *state, char *script, int lineno)
static int process_opcode(struct adsi_subscript *sub, char *code, char *args, struct adsi_script *state, const char *script, int lineno)
{
int x, res, max = sub->id ? MAX_SUB_LEN : MAX_MAIN_LEN;
char *unused;
@ -1010,7 +1010,7 @@ static int process_opcode(struct adsi_subscript *sub, char *code, char *args, st
return -1;
}
static int adsi_process(struct adsi_script *state, char *buf, char *script, int lineno)
static int adsi_process(struct adsi_script *state, char *buf, const char *script, int lineno)
{
char *keyword = get_token(&buf, script, lineno);
char *args, vname[256], tmp[80], tmp2[80];
@ -1358,7 +1358,7 @@ static int adsi_process(struct adsi_script *state, char *buf, char *script, int
return 0;
}
static struct adsi_script *compile_script(char *script)
static struct adsi_script *compile_script(const char *script)
{
FILE *f;
char fn[256], buf[256], *c;
@ -1451,7 +1451,7 @@ static void dump_message(char *type, char *vname, unsigned char *buf, int buflen
}
#endif
static int adsi_prog(struct ast_channel *chan, char *script)
static int adsi_prog(struct ast_channel *chan, const char *script)
{
struct adsi_script *scr;
int x, bytes;
@ -1562,7 +1562,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
return 0;
}
static int adsi_exec(struct ast_channel *chan, void *data)
static int adsi_exec(struct ast_channel *chan, const char *data)
{
int res = 0;

View File

@ -416,7 +416,7 @@ static int log_events(struct ast_channel *chan, char *signalling_type, event_no
*
* The function will return 0 when the caller hangs up, else a -1 if there was a problem.
*/
static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int fdto, int sdto, int tldn, event_node_t **ehead)
static int receive_ademco_contact_id(struct ast_channel *chan, const void *data, int fdto, int sdto, int tldn, event_node_t **ehead)
{
int i, j;
int res = 0;
@ -564,7 +564,7 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
* This is the main function called by Asterisk Core whenever the App is invoked in the extension logic.
* This function will always return 0.
*/
static int alarmreceiver_exec(struct ast_channel *chan, void *data)
static int alarmreceiver_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
event_node_t *elp, *efree;

View File

@ -143,7 +143,7 @@ static int dfltMaximumWordLength = 5000; /* Setting this to a large default s
/* Set to the lowest ms value provided in amd.conf or application parameters */
static int dfltMaxWaitTimeForFrame = 50;
static void isAnsweringMachine(struct ast_channel *chan, void *data)
static void isAnsweringMachine(struct ast_channel *chan, const char *data)
{
int res = 0;
struct ast_frame *f = NULL;
@ -404,7 +404,7 @@ static void isAnsweringMachine(struct ast_channel *chan, void *data)
}
static int amd_exec(struct ast_channel *chan, void *data)
static int amd_exec(struct ast_channel *chan, const char *data)
{
isAnsweringMachine(chan, data);

View File

@ -105,7 +105,7 @@ static char *app = "Authenticate";
</application>
***/
static int auth_exec(struct ast_channel *chan, void *data)
static int auth_exec(struct ast_channel *chan, const char *data)
{
int res = 0, retries, maxdigits;
char passwd[256], *prompt = "agent-pass", *argcopy = NULL;

View File

@ -44,9 +44,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</application>
***/
static char *nocdr_app = "NoCDR";
static const char nocdr_app[] = "NoCDR";
static int nocdr_exec(struct ast_channel *chan, void *data)
static int nocdr_exec(struct ast_channel *chan, const char *data)
{
if (chan->cdr)
ast_set_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED);

View File

@ -92,7 +92,7 @@ static char *app = "ChanIsAvail";
</application>
***/
static int chanavail_exec(struct ast_channel *chan, void *data)
static int chanavail_exec(struct ast_channel *chan, const char *data)
{
int inuse=-1, option_state=0, string_compare=0, option_all_avail=0;
int status;

View File

@ -62,7 +62,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
***/
static char *app = "ChannelRedirect";
static int asyncgoto_exec(struct ast_channel *chan, void *data)
static int asyncgoto_exec(struct ast_channel *chan, const char *data)
{
int res = -1;
char *info;

View File

@ -963,7 +963,7 @@ exit:
return res;
}
static int chanspy_exec(struct ast_channel *chan, void *data)
static int chanspy_exec(struct ast_channel *chan, const char *data)
{
char *myenforced = NULL;
char *mygroup = NULL;
@ -985,9 +985,9 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
AST_APP_ARG(options);
);
char *opts[OPT_ARG_ARRAY_SIZE];
char *parse = ast_strdupa(data);
data = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, data);
AST_STANDARD_APP_ARGS(args, parse);
if (args.spec && !strcmp(args.spec, "all"))
args.spec = NULL;
@ -1078,7 +1078,7 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
return res;
}
static int extenspy_exec(struct ast_channel *chan, void *data)
static int extenspy_exec(struct ast_channel *chan, const char *data)
{
char *ptr, *exten = NULL;
char *mygroup = NULL;
@ -1099,10 +1099,9 @@ static int extenspy_exec(struct ast_channel *chan, void *data)
AST_APP_ARG(context);
AST_APP_ARG(options);
);
char *parse = ast_strdupa(data);
data = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, data);
AST_STANDARD_APP_ARGS(args, parse);
if (!ast_strlen_zero(args.context) && (ptr = strchr(args.context, '@'))) {
exten = args.context;
*ptr++ = '\0';
@ -1199,7 +1198,7 @@ static int extenspy_exec(struct ast_channel *chan, void *data)
return res;
}
static int dahdiscan_exec(struct ast_channel *chan, void *data)
static int dahdiscan_exec(struct ast_channel *chan, const char *data)
{
const char *spec = "DAHDI";
struct ast_flags flags;

View File

@ -683,7 +683,7 @@ static int menu_callback(struct ast_bridge *bridge, struct ast_bridge_channel *b
}
/*! \brief The ConfBridge application */
static int confbridge_exec(struct ast_channel *chan, void *data)
static int confbridge_exec(struct ast_channel *chan, const char *data)
{
int res = 0, volume_adjustments[2];
char *parse;

View File

@ -125,7 +125,7 @@ static int is_argument(const char *haystack, int needle)
return 0;
}
static int controlplayback_exec(struct ast_channel *chan, void *data)
static int controlplayback_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
int skipms = 0;

View File

@ -258,7 +258,7 @@ outrun:
return ret;
}
static int conf_exec(struct ast_channel *chan, void *data)
static int conf_exec(struct ast_channel *chan, const char *data)
{
int res = -1;
int retrycnt = 0;

View File

@ -187,7 +187,7 @@ static void run_ras(struct ast_channel *chan, char *args)
ast_safe_fork_cleanup();
}
static int dahdiras_exec(struct ast_channel *chan, void *data)
static int dahdiras_exec(struct ast_channel *chan, const char *data)
{
int res=-1;
char *args;

View File

@ -83,7 +83,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *d_app = "DBdel";
static char *dt_app = "DBdeltree";
static int deltree_exec(struct ast_channel *chan, void *data)
static int deltree_exec(struct ast_channel *chan, const char *data)
{
char *argv, *family, *keytree;
@ -114,7 +114,7 @@ static int deltree_exec(struct ast_channel *chan, void *data)
return 0;
}
static int del_exec(struct ast_channel *chan, void *data)
static int del_exec(struct ast_channel *chan, const char *data)
{
char *argv, *family, *key;
static int deprecation_warning = 0;

View File

@ -1634,7 +1634,7 @@ static void end_bridge_callback_data_fixup(struct ast_bridge_config *bconfig, st
bconfig->end_bridge_callback_data = originator;
}
static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags64 *peerflags, int *continue_exec)
static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast_flags64 *peerflags, int *continue_exec)
{
int res = -1; /* default: error */
char *rest, *cur; /* scan the list of destinations */
@ -2423,7 +2423,7 @@ done:
return res;
}
static int dial_exec(struct ast_channel *chan, void *data)
static int dial_exec(struct ast_channel *chan, const char *data)
{
struct ast_flags64 peerflags;
@ -2432,7 +2432,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
return dial_exec_full(chan, data, &peerflags, NULL);
}
static int retrydial_exec(struct ast_channel *chan, void *data)
static int retrydial_exec(struct ast_channel *chan, const char *data)
{
char *parse;
const char *context = NULL;

View File

@ -81,7 +81,7 @@ static int play_and_wait(struct ast_channel *chan, char *file, char *digits)
return res;
}
static int dictate_exec(struct ast_channel *chan, void *data)
static int dictate_exec(struct ast_channel *chan, const char *data)
{
char *path = NULL, filein[256], *filename = "";
char *parse;

View File

@ -262,7 +262,7 @@ static int pickup_by_mark(struct ast_channel *chan, const char *mark)
}
/* application entry point for Pickup() */
static int pickup_exec(struct ast_channel *chan, void *data)
static int pickup_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *tmp = ast_strdupa(data);
@ -291,7 +291,7 @@ static int pickup_exec(struct ast_channel *chan, void *data)
}
/* application entry point for PickupChan() */
static int pickupchan_exec(struct ast_channel *chan, void *data)
static int pickupchan_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *tmp = ast_strdupa(data);

View File

@ -714,7 +714,7 @@ exit:
return res;
}
static int directory_exec(struct ast_channel *chan, void *data)
static int directory_exec(struct ast_channel *chan, const char *data)
{
int res = 0, digit = 3;
struct ast_config *cfg, *ucfg;

View File

@ -140,7 +140,7 @@ static void play_dialtone(struct ast_channel *chan, char *mailbox)
}
}
static int disa_exec(struct ast_channel *chan, void *data)
static int disa_exec(struct ast_channel *chan, const char *data)
{
int i = 0, j, k = 0, did_ignore = 0, special_noanswer = 0;
int firstdigittimeout = (chan->pbx ? chan->pbx->rtimeoutms : 20000);

View File

@ -147,7 +147,7 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
return 0;
}
static int dumpchan_exec(struct ast_channel *chan, void *data)
static int dumpchan_exec(struct ast_channel *chan, const char *data)
{
struct ast_str *vars = ast_str_thread_get(&ast_str_thread_global_buf, 16);
char info[1024];

View File

@ -48,7 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app = "Echo";
static int echo_exec(struct ast_channel *chan, void *data)
static int echo_exec(struct ast_channel *chan, const char *data)
{
int res = -1;
int format;

View File

@ -129,7 +129,7 @@ static char *app_exec = "Exec";
static char *app_tryexec = "TryExec";
static char *app_execif = "ExecIf";
static int exec_exec(struct ast_channel *chan, void *data)
static int exec_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *s, *appname, *endargs;
@ -163,7 +163,7 @@ static int exec_exec(struct ast_channel *chan, void *data)
return res;
}
static int tryexec_exec(struct ast_channel *chan, void *data)
static int tryexec_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *s, *appname, *endargs;
@ -198,7 +198,7 @@ static int tryexec_exec(struct ast_channel *chan, void *data)
return 0;
}
static int execif_exec(struct ast_channel *chan, void *data)
static int execif_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *truedata = NULL, *falsedata = NULL, *end, *firstcomma, *firstquestion;

View File

@ -311,7 +311,7 @@ static struct playlist_entry *make_entry(const char *filename)
return entry;
}
static int app_exec(struct ast_channel *chan, void *data)
static int app_exec(struct ast_channel *chan, const char *data)
{
struct ast_flags flags = { 0, };
char *opts[0];

View File

@ -705,7 +705,7 @@ static int transmit(fax_session *s)
/* === Application functions === */
static int sndfax_exec(struct ast_channel *chan, void *data)
static int sndfax_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *parse;
@ -749,7 +749,7 @@ static int sndfax_exec(struct ast_channel *chan, void *data)
return res;
}
static int rcvfax_exec(struct ast_channel *chan, void *data)
static int rcvfax_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *parse;

View File

@ -264,7 +264,7 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
return res;
}
static int festival_exec(struct ast_channel *chan, void *vdata)
static int festival_exec(struct ast_channel *chan, const char *vdata)
{
int usecache;
int res = 0;

View File

@ -72,7 +72,7 @@ static inline int dahdi_wait_event(int fd)
return j;
}
static int flash_exec(struct ast_channel *chan, void *data)
static int flash_exec(struct ast_channel *chan, const char *data)
{
int res = -1;
int x;

View File

@ -275,18 +275,19 @@ static void profile_set_param(struct call_followme *f, const char *param, const
}
/*! \brief Add a new number */
static struct number *create_followme_number(char *number, int timeout, int numorder)
static struct number *create_followme_number(const char *number, int timeout, int numorder)
{
struct number *cur;
char *buf = ast_strdupa(number);
char *tmp;
if (!(cur = ast_calloc(1, sizeof(*cur))))
return NULL;
cur->timeout = timeout;
if ((tmp = strchr(number, ',')))
if ((tmp = strchr(buf, ',')))
*tmp = '\0';
ast_copy_string(cur->number, number, sizeof(cur->number));
ast_copy_string(cur->number, buf, sizeof(cur->number));
cur->order = numorder;
ast_debug(1, "Created a number, %s, order of , %d, with a timeout of %ld.\n", cur->number, cur->order, cur->timeout);
@ -996,7 +997,7 @@ static void end_bridge_callback_data_fixup(struct ast_bridge_config *bconfig, st
bconfig->end_bridge_callback_data = originator;
}
static int app_exec(struct ast_channel *chan, void *data)
static int app_exec(struct ast_channel *chan, const char *data)
{
struct fm_args targs = { 0, };
struct ast_bridge_config config;

View File

@ -226,7 +226,7 @@ static void ast_cdr_fork(struct ast_channel *chan, struct ast_flags optflags, ch
ast_set_flag(cdr, AST_CDR_FLAG_CHILD | AST_CDR_FLAG_LOCKED);
}
static int forkcdr_exec(struct ast_channel *chan, void *data)
static int forkcdr_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *argcopy = NULL;

View File

@ -61,7 +61,7 @@ static int cpeid_setstatus(struct ast_channel *chan, char *stuff[], int voice)
return ast_adsi_print(chan, tmp, justify, voice);
}
static int cpeid_exec(struct ast_channel *chan, void *idata)
static int cpeid_exec(struct ast_channel *chan, const char *idata)
{
int res=0;
unsigned char cpeid[4];

View File

@ -104,7 +104,7 @@ static int icesencode(char *filename, int fd)
_exit(0);
}
static int ices_exec(struct ast_channel *chan, void *data)
static int ices_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
int fds[2];

View File

@ -69,7 +69,7 @@ static char *app = "SendImage";
</application>
***/
static int sendimage_exec(struct ast_channel *chan, void *data)
static int sendimage_exec(struct ast_channel *chan, const char *data)
{
if (ast_strlen_zero(data)) {

View File

@ -59,7 +59,7 @@ static char *app = "IVRDemo";
static int ivr_demo_func(struct ast_channel *chan, void *data)
{
ast_verbose("IVR Demo, data is %s!\n", (char *)data);
ast_verbose("IVR Demo, data is %s!\n", (char *) data);
return 0;
}
@ -93,22 +93,24 @@ AST_IVR_DECLARE_MENU(ivr_demo, "IVR Demo Main Menu", 0,
{ NULL },
});
static int skel_exec(struct ast_channel *chan, void *data)
static int skel_exec(struct ast_channel *chan, const char *data)
{
int res=0;
char *tmp;
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "skel requires an argument (filename)\n");
return -1;
}
tmp = ast_strdupa(data);
/* Do our thing here */
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
if (!res)
res = ast_ivr_menu_run(chan, &ivr_demo, data);
res = ast_ivr_menu_run(chan, &ivr_demo, tmp);
return res;
}

View File

@ -740,19 +740,14 @@ static int handle_options(struct jack_data *jack_data, const char *__options_str
return 0;
}
static int jack_exec(struct ast_channel *chan, void *data)
static int jack_exec(struct ast_channel *chan, const char *data)
{
struct jack_data *jack_data;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(options);
);
if (!(jack_data = jack_data_alloc()))
return -1;
args.options = data;
if (!ast_strlen_zero(args.options) && handle_options(jack_data, args.options)) {
if (!ast_strlen_zero(data) && handle_options(jack_data, data)) {
destroy_jack_data(jack_data);
return -1;
}

View File

@ -216,7 +216,7 @@ static struct ast_exten *find_matching_priority(struct ast_context *c, const cha
return NULL;
}
static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
static int _macro_exec(struct ast_channel *chan, const char *data, int exclusive)
{
const char *s;
char *tmp;
@ -426,7 +426,8 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
gosub_level++;
ast_debug(1, "Incrementing gosub_level\n");
} else if (!strcasecmp(runningapp, "GOSUBIF")) {
char *cond, *app_arg, *app2;
char *cond, *app_arg;
char *app2;
ast_str_substitute_variables(&tmp_subst, 0, chan, runningdata);
app2 = ast_str_buffer(tmp_subst);
cond = strsep(&app2, "?");
@ -454,8 +455,7 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
ast_str_substitute_variables(&tmp_subst, 0, chan, runningdata);
tmp2 = ast_str_buffer(tmp_subst);
if (!strcasecmp(runningapp, "EXECIF")) {
tmp3 = strchr(tmp2, '|');
if (tmp3) {
if ((tmp3 = strchr(tmp2, '|'))) {
*tmp3++ = '\0';
}
if (!pbx_checkcondition(tmp2)) {
@ -569,17 +569,17 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
return res;
}
static int macro_exec(struct ast_channel *chan, void *data)
static int macro_exec(struct ast_channel *chan, const char *data)
{
return _macro_exec(chan, data, 0);
}
static int macroexclusive_exec(struct ast_channel *chan, void *data)
static int macroexclusive_exec(struct ast_channel *chan, const char *data)
{
return _macro_exec(chan, data, 1);
}
static int macroif_exec(struct ast_channel *chan, void *data)
static int macroif_exec(struct ast_channel *chan, const char *data)
{
char *expr = NULL, *label_a = NULL, *label_b = NULL;
int res = 0;
@ -604,7 +604,7 @@ static int macroif_exec(struct ast_channel *chan, void *data)
return res;
}
static int macro_exit_exec(struct ast_channel *chan, void *data)
static int macro_exit_exec(struct ast_channel *chan, const char *data)
{
return MACRO_EXIT_RESULT;
}

View File

@ -861,7 +861,7 @@ static int audio_buffers;
* conversion... the numbers have been modified
* to give the user a better level of adjustability
*/
static char const gain_map[] = {
static const char gain_map[] = {
-15,
-13,
-10,
@ -876,7 +876,7 @@ static char const gain_map[] = {
};
static int admin_exec(struct ast_channel *chan, void *data);
static int admin_exec(struct ast_channel *chan, const char *data);
static void *recordthread(void *args);
static char *istalking(int x)
@ -1144,7 +1144,7 @@ cnfout:
static char *complete_meetmecmd(const char *line, const char *word, int pos, int state)
{
static char *cmds[] = {"concise", "lock", "unlock", "mute", "unmute", "kick", "list", NULL};
static const char * const cmds[] = {"concise", "lock", "unlock", "mute", "unmute", "kick", "list", NULL};
int len = strlen(word);
int which = 0;
@ -3600,7 +3600,7 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
}
/*! \brief The MeetmeCount application */
static int count_exec(struct ast_channel *chan, void *data)
static int count_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
struct ast_conference *conf;
@ -3646,7 +3646,7 @@ static int count_exec(struct ast_channel *chan, void *data)
}
/*! \brief The meetme() application */
static int conf_exec(struct ast_channel *chan, void *data)
static int conf_exec(struct ast_channel *chan, const char *data)
{
int res = -1;
char confno[MAX_CONFNUM] = "";
@ -3657,7 +3657,8 @@ static int conf_exec(struct ast_channel *chan, void *data)
int dynamic = 0;
int empty = 0, empty_no_pin = 0;
int always_prompt = 0;
char *notdata, *info, the_pin[MAX_PIN] = "";
const char *notdata;
char *info, the_pin[MAX_PIN] = "";
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(confno);
AST_APP_ARG(options);
@ -3920,7 +3921,7 @@ static struct ast_conf_user *find_user(struct ast_conference *conf, char *caller
/*! \brief The MeetMeadmin application */
/* MeetMeAdmin(confno, command, caller) */
static int admin_exec(struct ast_channel *chan, void *data) {
static int admin_exec(struct ast_channel *chan, const char *data) {
char *params;
struct ast_conference *cnf;
struct ast_conf_user *user = NULL;
@ -4102,7 +4103,7 @@ static int admin_exec(struct ast_channel *chan, void *data) {
/*--- channel_admin_exec: The MeetMeChannelAdmin application */
/* MeetMeChannelAdmin(channel, command) */
static int channel_admin_exec(struct ast_channel *chan, void *data) {
static int channel_admin_exec(struct ast_channel *chan, const char *data) {
char *params;
struct ast_conference *conf = NULL;
struct ast_conf_user *user = NULL;
@ -4235,7 +4236,7 @@ static int action_meetmeunmute(struct mansession *s, const struct message *m)
return meetmemute(s, m, 0);
}
static char mandescr_meetmelist[] =
static const char mandescr_meetmelist[] =
"Description: Lists all users in a particular MeetMe conference.\n"
"MeetmeList will follow as separate events, followed by a final event called\n"
"MeetmeListComplete.\n"
@ -5552,7 +5553,7 @@ static struct sla_trunk_ref *sla_choose_idle_trunk(const struct sla_station *sta
return trunk_ref;
}
static int sla_station_exec(struct ast_channel *chan, void *data)
static int sla_station_exec(struct ast_channel *chan, const char *data)
{
char *station_name, *trunk_name;
struct sla_station *station;
@ -5759,7 +5760,7 @@ AST_APP_OPTIONS(sla_trunk_opts, BEGIN_OPTIONS
AST_APP_OPTION_ARG('M', SLA_TRUNK_OPT_MOH, SLA_TRUNK_OPT_ARG_MOH_CLASS),
END_OPTIONS );
static int sla_trunk_exec(struct ast_channel *chan, void *data)
static int sla_trunk_exec(struct ast_channel *chan, const char *data)
{
char conf_name[MAX_CONFNUM];
struct ast_conference *conf;

View File

@ -55,9 +55,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</application>
***/
static char *app = "Milliwatt";
static const char app[] = "Milliwatt";
static char digital_milliwatt[] = {0x1e,0x0b,0x0b,0x1e,0x9e,0x8b,0x8b,0x9e} ;
static const char digital_milliwatt[] = {0x1e,0x0b,0x0b,0x1e,0x9e,0x8b,0x8b,0x9e} ;
static void *milliwatt_alloc(struct ast_channel *chan, void *params)
{
@ -139,7 +139,7 @@ static int old_milliwatt_exec(struct ast_channel *chan)
return -1;
}
static int milliwatt_exec(struct ast_channel *chan, void *data)
static int milliwatt_exec(struct ast_channel *chan, const char *data)
{
const char *options = data;
struct ast_app *playtones_app;

View File

@ -1922,7 +1922,7 @@ static void queue_mwi_event(const char *mbx, const char *ctx, int urgent, int ne
/*!\internal
* \brief Send MWI using interal Asterisk event subsystem */
static int minivm_mwi_exec(struct ast_channel *chan, void *data)
static int minivm_mwi_exec(struct ast_channel *chan, const char *data)
{
int argc;
char *argv[4];
@ -1964,7 +1964,7 @@ static int minivm_mwi_exec(struct ast_channel *chan, void *data)
/*!\internal
* \brief Notify voicemail account owners - either generic template or user specific */
static int minivm_notify_exec(struct ast_channel *chan, void *data)
static int minivm_notify_exec(struct ast_channel *chan, const char *data)
{
int argc;
char *argv[2];
@ -2044,7 +2044,7 @@ static int minivm_notify_exec(struct ast_channel *chan, void *data)
/*!\internal
* \brief Dialplan function to record voicemail */
static int minivm_record_exec(struct ast_channel *chan, void *data)
static int minivm_record_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *tmp;
@ -2101,7 +2101,7 @@ static int minivm_record_exec(struct ast_channel *chan, void *data)
/*!\internal
* \brief Play voicemail prompts - either generic or user specific */
static int minivm_greet_exec(struct ast_channel *chan, void *data)
static int minivm_greet_exec(struct ast_channel *chan, const char *data)
{
struct leave_vm_options leave_options = { 0, '\0'};
int argc;
@ -2288,7 +2288,7 @@ static int minivm_greet_exec(struct ast_channel *chan, void *data)
/*!\internal
* \brief Dialplan application to delete voicemail */
static int minivm_delete_exec(struct ast_channel *chan, void *data)
static int minivm_delete_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char filename[BUFSIZ];
@ -2326,7 +2326,7 @@ static int minivm_delete_exec(struct ast_channel *chan, void *data)
}
/*! \brief Record specific messages for voicemail account */
static int minivm_accmess_exec(struct ast_channel *chan, void *data)
static int minivm_accmess_exec(struct ast_channel *chan, const char *data)
{
int argc = 0;
char *argv[2];

View File

@ -322,7 +322,7 @@ static void launch_monitor_thread(struct ast_channel *chan, const char *filename
ast_pthread_create_detached_background(&thread, NULL, mixmonitor_thread, mixmonitor);
}
static int mixmonitor_exec(struct ast_channel *chan, void *data)
static int mixmonitor_exec(struct ast_channel *chan, const char *data)
{
int x, readvol = 0, writevol = 0;
struct ast_flags flags = {0};
@ -403,7 +403,7 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data)
return 0;
}
static int stop_mixmonitor_exec(struct ast_channel *chan, void *data)
static int stop_mixmonitor_exec(struct ast_channel *chan, const char *data)
{
ast_audiohook_detach_source(chan, mixmonitor_spy_type);
return 0;

View File

@ -63,9 +63,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</see-also>
</application>
***/
static char *app_morsecode = "Morsecode";
static const char app_morsecode[] = "Morsecode";
static char *morsecode[] = {
static const char * const morsecode[] = {
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", /* 0-15 */
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", /* 16-31 */
" ", /* 32 - <space> */
@ -118,10 +118,10 @@ static void playtone(struct ast_channel *chan, int tone, int len)
ast_playtones_stop(chan);
}
static int morsecode_exec(struct ast_channel *chan, void *data)
static int morsecode_exec(struct ast_channel *chan, const char *data)
{
int res=0, ditlen, tone;
char *digit;
const char *digit;
const char *ditlenc, *tonec;
if (ast_strlen_zero(data)) {
@ -147,7 +147,7 @@ static int morsecode_exec(struct ast_channel *chan, void *data)
for (digit = data; *digit; digit++) {
int digit2 = *digit;
char *dahdit;
const char *dahdit;
if (digit2 < 0) {
continue;
}

View File

@ -117,7 +117,7 @@ static int timed_read(int fd, void *data, int datalen, int timeout)
}
static int mp3_exec(struct ast_channel *chan, void *data)
static int mp3_exec(struct ast_channel *chan, const char *data)
{
int res=0;
int fds[2];

View File

@ -105,7 +105,7 @@ static int timed_read(int fd, void *data, int datalen)
}
static int NBScat_exec(struct ast_channel *chan, void *data)
static int NBScat_exec(struct ast_channel *chan, const char *data)
{
int res=0;
int fds[2];

View File

@ -89,7 +89,7 @@ static const char app_originate[] = "Originate";
</application>
***/
static int originate_exec(struct ast_channel *chan, void *data)
static int originate_exec(struct ast_channel *chan, const char *data)
{
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(tech_data);

View File

@ -1296,8 +1296,8 @@ static int osp_finish(
* \return 0 Success, -1 Failed
*/
static int ospauth_exec(
struct ast_channel* chan,
void* data)
struct ast_channel *chan,
const char *data)
{
int res;
const char* provider = OSP_DEF_PROVIDER;
@ -1377,7 +1377,7 @@ static int ospauth_exec(
*/
static int osplookup_exec(
struct ast_channel* chan,
void* data)
const void* data)
{
int res, cres;
const char* provider = OSP_DEF_PROVIDER;
@ -1551,7 +1551,7 @@ static int osplookup_exec(
*/
static int ospnext_exec(
struct ast_channel* chan,
void* data)
const void* data)
{
int res;
const char* provider = OSP_DEF_PROVIDER;
@ -1707,7 +1707,7 @@ static int ospnext_exec(
*/
static int ospfinished_exec(
struct ast_channel* chan,
void* data)
const void* data)
{
int res = 1;
int cause = 0;

View File

@ -118,7 +118,7 @@ AST_APP_OPTIONS(page_opts, {
});
static int page_exec(struct ast_channel *chan, void *data)
static int page_exec(struct ast_channel *chan, const char *data)
{
char *tech, *resource, *tmp;
char meetmeopts[88], originator[AST_CHANNEL_NAME], *opts[0];

View File

@ -85,7 +85,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app = "ParkAndAnnounce";
static int parkandannounce_exec(struct ast_channel *chan, void *data)
static int parkandannounce_exec(struct ast_channel *chan, const char *data)
{
int res = -1;
int lot, timeout = 0, dres;

View File

@ -380,7 +380,7 @@ static int say_init_mode(const char *mode) {
static char *__say_cli_init(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
const char *old_mode = say_api_buf[0] ? say_new : say_old;
char *mode;
const char *mode;
switch (cmd) {
case CLI_INIT:
e->command = "say load [new|old]";
@ -415,7 +415,7 @@ static struct ast_cli_entry cli_playback[] = {
AST_CLI_DEFINE(__say_cli_init, "Set or show the say mode"),
};
static int playback_exec(struct ast_channel *chan, void *data)
static int playback_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
int mres = 0;

View File

@ -72,7 +72,7 @@ static const char stopplaytones_app[] = "StopPlayTones";
</application>
***/
static int handle_playtones(struct ast_channel *chan, void *data)
static int handle_playtones(struct ast_channel *chan, const char *data)
{
struct ast_tone_zone_sound *ts;
int res;
@ -99,7 +99,7 @@ static int handle_playtones(struct ast_channel *chan, void *data)
return res;
}
static int handle_stopplaytones(struct ast_channel *chan, void *data)
static int handle_stopplaytones(struct ast_channel *chan, const char *data)
{
ast_playtones_stop(chan);

View File

@ -80,7 +80,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app = "PrivacyManager";
static int privacy_exec (struct ast_channel *chan, void *data)
static int privacy_exec(struct ast_channel *chan, const char *data)
{
int res=0;
int retries;

View File

@ -593,7 +593,7 @@ enum queue_result {
QUEUE_CONTINUE = 7,
};
const struct {
static const struct {
enum queue_result id;
char *text;
} queue_results[] = {
@ -2403,7 +2403,7 @@ static void do_hang(struct callattempt *o)
static char *vars2manager(struct ast_channel *chan, char *vars, size_t len)
{
struct ast_str *buf = ast_str_thread_get(&ast_str_thread_global_buf, len + 1);
char *tmp;
const char *tmp;
if (pbx_builtin_serialize_variables(chan, &buf)) {
int i, j;
@ -4651,7 +4651,7 @@ static int set_member_paused(const char *queuename, const char *interface, const
}
/* \brief Sets members penalty, if queuename=NULL we set member penalty in all the queues. */
static int set_member_penalty(char *queuename, char *interface, int penalty)
static int set_member_penalty(const char *queuename, const char *interface, int penalty)
{
int foundinterface = 0, foundqueue = 0;
struct call_queue *q;
@ -4828,7 +4828,7 @@ static void reload_queue_members(void)
}
/*! \brief PauseQueueMember application */
static int pqm_exec(struct ast_channel *chan, void *data)
static int pqm_exec(struct ast_channel *chan, const char *data)
{
char *parse;
AST_DECLARE_APP_ARGS(args,
@ -4864,7 +4864,7 @@ static int pqm_exec(struct ast_channel *chan, void *data)
}
/*! \brief UnPauseQueueMember application */
static int upqm_exec(struct ast_channel *chan, void *data)
static int upqm_exec(struct ast_channel *chan, const char *data)
{
char *parse;
AST_DECLARE_APP_ARGS(args,
@ -4900,7 +4900,7 @@ static int upqm_exec(struct ast_channel *chan, void *data)
}
/*! \brief RemoveQueueMember application */
static int rqm_exec(struct ast_channel *chan, void *data)
static int rqm_exec(struct ast_channel *chan, const char *data)
{
int res=-1;
char *parse, *temppos = NULL;
@ -4957,7 +4957,7 @@ static int rqm_exec(struct ast_channel *chan, void *data)
}
/*! \brief AddQueueMember application */
static int aqm_exec(struct ast_channel *chan, void *data)
static int aqm_exec(struct ast_channel *chan, const char *data)
{
int res=-1;
char *parse, *temppos = NULL;
@ -5020,7 +5020,7 @@ static int aqm_exec(struct ast_channel *chan, void *data)
}
/*! \brief QueueLog application */
static int ql_exec(struct ast_channel *chan, void *data)
static int ql_exec(struct ast_channel *chan, const char *data)
{
char *parse;
@ -5095,7 +5095,7 @@ static void copy_rules(struct queue_ent *qe, const char *rulename)
* 6. Try 4 again unless some condition (such as an expiration time) causes us to
* exit the queue.
*/
static int queue_exec(struct ast_channel *chan, void *data)
static int queue_exec(struct ast_channel *chan, const char *data)
{
int res=-1;
int ringing=0;
@ -6145,7 +6145,7 @@ static void do_print(struct mansession *s, int fd, const char *str)
* List the queues strategy, calls processed, members logged in,
* other queue statistics such as avg hold time.
*/
static char *__queues_show(struct mansession *s, int fd, int argc, char **argv)
static char *__queues_show(struct mansession *s, int fd, int argc, const char * const *argv)
{
struct call_queue *q;
struct ast_str *out = ast_str_alloca(240);
@ -6320,7 +6320,7 @@ static char *queue_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a
*/
static int manager_queues_show(struct mansession *s, const struct message *m)
{
char *a[] = { "queue", "show" };
static const char * const a[] = { "queue", "show" };
__queues_show(s, -1, 2, a);
astman_append(s, "\r\n\r\n"); /* Properly terminate Manager output */
@ -6756,7 +6756,7 @@ static int manager_queue_member_penalty(struct mansession *s, const struct messa
static char *handle_queue_add_member(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *queuename, *interface, *membername = NULL, *state_interface = NULL;
const char *queuename, *interface, *membername = NULL, *state_interface = NULL;
int penalty;
switch ( cmd ) {
@ -6871,7 +6871,7 @@ static char *complete_queue_remove_member(const char *line, const char *word, in
static char *handle_queue_remove_member(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *queuename, *interface;
const char *queuename, *interface;
switch (cmd) {
case CLI_INIT:
@ -6936,7 +6936,7 @@ static char *complete_queue_pause_member(const char *line, const char *word, int
static char *handle_queue_pause_member(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *queuename, *interface, *reason;
const char *queuename, *interface, *reason;
int paused;
switch (cmd) {
@ -7010,7 +7010,7 @@ static char *complete_queue_set_member_penalty(const char *line, const char *wor
static char *handle_queue_set_member_penalty(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *queuename = NULL, *interface;
const char *queuename = NULL, *interface;
int penalty = 0;
switch (cmd) {
@ -7072,7 +7072,7 @@ static char *complete_queue_rule_show(const char *line, const char *word, int po
static char *handle_queue_rule_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *rule;
const char *rule;
struct rule_list *rl_iter;
struct penalty_rule *pr_iter;
switch (cmd) {

View File

@ -122,9 +122,7 @@ AST_APP_OPTIONS(read_app_options, {
static char *app = "Read";
#define ast_next_data(instr,ptr,delim) if((ptr=strchr(instr,delim))) { *(ptr) = '\0' ; ptr++;}
static int read_exec(struct ast_channel *chan, void *data)
static int read_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char tmp[256] = "";

View File

@ -125,7 +125,7 @@ AST_APP_OPTIONS(readexten_app_options, {
static char *app = "ReadExten";
static int readexten_exec(struct ast_channel *chan, void *data)
static int readexten_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char exten[256] = "";

View File

@ -67,7 +67,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app_readfile = "ReadFile";
static int readfile_exec(struct ast_channel *chan, void *data)
static int readfile_exec(struct ast_channel *chan, const char *data)
{
int res=0;
char *s, *varname=NULL, *file=NULL, *length=NULL, *returnvar=NULL;

View File

@ -129,7 +129,7 @@ AST_APP_OPTIONS(app_opts,{
AST_APP_OPTION('x', OPTION_IGNORE_TERMINATE),
});
static int record_exec(struct ast_channel *chan, void *data)
static int record_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
int count = 0;

View File

@ -439,7 +439,7 @@ static char *descrip =
static int debug = 0; /* Set this >0 for extra debug output */
static int nrpts = 0;
static char remdtmfstr[] = "0123456789*#ABCD";
static const char remdtmfstr[] = "0123456789*#ABCD";
enum {TOP_TOP,TOP_WON,WON_BEFREAD,BEFREAD_AFTERREAD};
@ -13114,7 +13114,7 @@ char *this,*val;
pthread_exit(NULL);
}
static int rpt_exec(struct ast_channel *chan, void *data)
static int rpt_exec(struct ast_channel *chan, const void *data)
{
int res=-1,i,rem_totx,rem_rx,remkeyed,n,phone_mode = 0;
int iskenwood_pci4,authtold,authreq,setting,notremming,reming;

View File

@ -89,7 +89,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app_sayunixtime = "SayUnixTime";
static char *app_datetime = "DateTime";
static int sayunixtime_exec(struct ast_channel *chan, void *data)
static int sayunixtime_exec(struct ast_channel *chan, const char *data)
{
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(timeval);

View File

@ -62,7 +62,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
***/
static char *app = "SendDTMF";
static int senddtmf_exec(struct ast_channel *chan, void *vdata)
static int senddtmf_exec(struct ast_channel *chan, const char *vdata)
{
int res = 0;
char *data;
@ -90,7 +90,7 @@ static int senddtmf_exec(struct ast_channel *chan, void *vdata)
return res;
}
static char mandescr_playdtmf[] =
static const char mandescr_playdtmf[] =
"Description: Plays a dtmf digit on the specified channel.\n"
"Variables: (all are required)\n"
" Channel: Channel name to send digit to\n"

View File

@ -72,7 +72,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static const char * const app = "SendText";
static int sendtext_exec(struct ast_channel *chan, void *data)
static int sendtext_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *status = "UNSUPPORTED";

View File

@ -84,7 +84,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app2 = "SetCallerPres";
static int setcallerid_pres_exec(struct ast_channel *chan, void *data)
static int setcallerid_pres_exec(struct ast_channel *chan, const char *data)
{
int pres = -1;
static int deprecated = 0;

View File

@ -94,7 +94,7 @@ AST_APP_OPTIONS(app_opts,{
});
static int app_exec(struct ast_channel *chan, void *data)
static int app_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
struct ast_flags flags;

View File

@ -123,7 +123,7 @@ static char *app = "SMS";
* To pick the two carriers (1300Hz for '1' and 2100 Hz for '0') used by
* the modulation, we should take one every 13 and 21 samples respectively.
*/
static signed short wave[] = {
static const signed short wave[] = {
0, 392, 782, 1167, 1545, 1913, 2270, 2612, 2939, 3247, 3536, 3802, 4045, 4263, 4455, 4619, 4755, 4862, 4938, 4985,
5000, 4985, 4938, 4862, 4755, 4619, 4455, 4263, 4045, 3802, 3536, 3247, 2939, 2612, 2270, 1913, 1545, 1167, 782, 392,
0, -392, -782, -1167,
@ -1855,7 +1855,7 @@ AST_APP_OPTIONS(sms_options, {
AST_APP_OPTION_ARG('p', OPTION_PAUSE, OPTION_ARG_PAUSE),
} );
static int sms_exec(struct ast_channel *chan, void *data)
static int sms_exec(struct ast_channel *chan, const char *data)
{
int res = -1;
sms_t h = { 0 };

View File

@ -69,7 +69,7 @@ AST_APP_OPTIONS(app_opts,{
AST_APP_OPTION('a', OPTION_ALL),
});
static int softhangup_exec(struct ast_channel *chan, void *data)
static int softhangup_exec(struct ast_channel *chan, const char *data)
{
struct ast_channel *c = NULL;
char *cut, *opts[0];

View File

@ -481,7 +481,7 @@ static struct ast_custom_function speech_function = {
/*! \brief SpeechCreate() Dialplan Application */
static int speech_create(struct ast_channel *chan, void *data)
static int speech_create(struct ast_channel *chan, const char *data)
{
struct ast_speech *speech = NULL;
struct ast_datastore *datastore = NULL;
@ -508,7 +508,7 @@ static int speech_create(struct ast_channel *chan, void *data)
}
/*! \brief SpeechLoadGrammar(Grammar Name,Path) Dialplan Application */
static int speech_load(struct ast_channel *chan, void *vdata)
static int speech_load(struct ast_channel *chan, const char *vdata)
{
int res = 0;
struct ast_speech *speech = find_speech(chan);
@ -534,7 +534,7 @@ static int speech_load(struct ast_channel *chan, void *vdata)
}
/*! \brief SpeechUnloadGrammar(Grammar Name) Dialplan Application */
static int speech_unload(struct ast_channel *chan, void *data)
static int speech_unload(struct ast_channel *chan, const char *data)
{
int res = 0;
struct ast_speech *speech = find_speech(chan);
@ -549,7 +549,7 @@ static int speech_unload(struct ast_channel *chan, void *data)
}
/*! \brief SpeechDeactivateGrammar(Grammar Name) Dialplan Application */
static int speech_deactivate(struct ast_channel *chan, void *data)
static int speech_deactivate(struct ast_channel *chan, const char *data)
{
int res = 0;
struct ast_speech *speech = find_speech(chan);
@ -564,7 +564,7 @@ static int speech_deactivate(struct ast_channel *chan, void *data)
}
/*! \brief SpeechActivateGrammar(Grammar Name) Dialplan Application */
static int speech_activate(struct ast_channel *chan, void *data)
static int speech_activate(struct ast_channel *chan, const char *data)
{
int res = 0;
struct ast_speech *speech = find_speech(chan);
@ -579,7 +579,7 @@ static int speech_activate(struct ast_channel *chan, void *data)
}
/*! \brief SpeechStart() Dialplan Application */
static int speech_start(struct ast_channel *chan, void *data)
static int speech_start(struct ast_channel *chan, const char *data)
{
int res = 0;
struct ast_speech *speech = find_speech(chan);
@ -593,7 +593,7 @@ static int speech_start(struct ast_channel *chan, void *data)
}
/*! \brief SpeechProcessingSound(Sound File) Dialplan Application */
static int speech_processing_sound(struct ast_channel *chan, void *data)
static int speech_processing_sound(struct ast_channel *chan, const char *data)
{
int res = 0;
struct ast_speech *speech = find_speech(chan);
@ -636,7 +636,7 @@ AST_APP_OPTIONS(speech_background_options, BEGIN_OPTIONS
END_OPTIONS );
/*! \brief SpeechBackground(Sound File,Timeout) Dialplan Application */
static int speech_background(struct ast_channel *chan, void *data)
static int speech_background(struct ast_channel *chan, const char *data)
{
unsigned int timeout = 0;
int res = 0, done = 0, started = 0, quieted = 0, max_dtmf_len = 0;
@ -888,7 +888,7 @@ static int speech_background(struct ast_channel *chan, void *data)
/*! \brief SpeechDestroy() Dialplan Application */
static int speech_destroy(struct ast_channel *chan, void *data)
static int speech_destroy(struct ast_channel *chan, const char *data)
{
int res = 0;
struct ast_speech *speech = find_speech(chan);

View File

@ -266,7 +266,7 @@ static void gosub_free(void *data)
ast_free(oldlist);
}
static int pop_exec(struct ast_channel *chan, void *data)
static int pop_exec(struct ast_channel *chan, const char *data)
{
struct ast_datastore *stack_store = ast_channel_datastore_find(chan, &stack_info, NULL);
struct gosub_stack_frame *oldframe;
@ -290,12 +290,12 @@ static int pop_exec(struct ast_channel *chan, void *data)
return 0;
}
static int return_exec(struct ast_channel *chan, void *data)
static int return_exec(struct ast_channel *chan, const char *data)
{
struct ast_datastore *stack_store = ast_channel_datastore_find(chan, &stack_info, NULL);
struct gosub_stack_frame *oldframe;
AST_LIST_HEAD(, gosub_stack_frame) *oldlist;
char *retval = data;
const char *retval = data;
if (!stack_store) {
ast_log(LOG_ERROR, "Return without Gosub: stack is unallocated\n");
@ -320,7 +320,7 @@ static int return_exec(struct ast_channel *chan, void *data)
return 0;
}
static int gosub_exec(struct ast_channel *chan, void *data)
static int gosub_exec(struct ast_channel *chan, const char *data)
{
struct ast_datastore *stack_store = ast_channel_datastore_find(chan, &stack_info, NULL);
AST_LIST_HEAD(, gosub_stack_frame) *oldlist;
@ -410,7 +410,7 @@ static int gosub_exec(struct ast_channel *chan, void *data)
return 0;
}
static int gosubif_exec(struct ast_channel *chan, void *data)
static int gosubif_exec(struct ast_channel *chan, const char *data)
{
char *args;
int res=0;
@ -537,7 +537,7 @@ static struct ast_custom_function peek_function = {
.read = peek_read,
};
static int handle_gosub(struct ast_channel *chan, AGI *agi, int argc, char **argv)
static int handle_gosub(struct ast_channel *chan, AGI *agi, int argc, const char * const *argv)
{
int old_priority, priority;
char old_context[AST_MAX_CONTEXT], old_extension[AST_MAX_EXTENSION];
@ -627,7 +627,7 @@ static int handle_gosub(struct ast_channel *chan, AGI *agi, int argc, char **arg
return RESULT_SUCCESS;
}
static char usage_gosub[] =
static const char usage_gosub[] =
" Usage: GOSUB <context> <extension> <priority> [<optional-argument>]\n"
" Cause the channel to execute the specified dialplan subroutine, returning\n"
" to the dialplan with execution of a Return()\n";

View File

@ -100,7 +100,7 @@ static char *app2 = "TrySystem";
static char *chanvar = "SYSTEMSTATUS";
static int system_exec_helper(struct ast_channel *chan, void *data, int failmode)
static int system_exec_helper(struct ast_channel *chan, const char *data, int failmode)
{
int res = 0;
struct ast_str *buf = ast_str_thread_get(&buf_buf, 16);
@ -140,12 +140,12 @@ static int system_exec_helper(struct ast_channel *chan, void *data, int failmode
return res;
}
static int system_exec(struct ast_channel *chan, void *data)
static int system_exec(struct ast_channel *chan, const char *data)
{
return system_exec_helper(chan, data, -1);
}
static int trysystem_exec(struct ast_channel *chan, void *data)
static int trysystem_exec(struct ast_channel *chan, const char *data)
{
return system_exec_helper(chan, data, 0);
}

View File

@ -73,7 +73,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app = "BackgroundDetect";
static int background_detect_exec(struct ast_channel *chan, void *data)
static int background_detect_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *tmp;

View File

@ -143,10 +143,10 @@ static int sendnoise(struct ast_channel *chan, int ms)
return res;
}
static int testclient_exec(struct ast_channel *chan, void *data)
static int testclient_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *testid=data;
const char *testid=data;
char fn[80];
char serverver[80];
FILE *f;
@ -318,7 +318,7 @@ static int testclient_exec(struct ast_channel *chan, void *data)
return res;
}
static int testserver_exec(struct ast_channel *chan, void *data)
static int testserver_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char testid[80]="";

View File

@ -74,7 +74,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static const char * const app = "Transfer";
static int transfer_exec(struct ast_channel *chan, void *data)
static int transfer_exec(struct ast_channel *chan, const char *data)
{
int res;
int len;

View File

@ -90,7 +90,7 @@ AST_APP_OPTIONS(app_opts,{
AST_APP_OPTION('w', OPTION_WAIT),
});
static int sendurl_exec(struct ast_channel *chan, void *data)
static int sendurl_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *tmp;

View File

@ -56,7 +56,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app = "UserEvent";
static int userevent_exec(struct ast_channel *chan, void *data)
static int userevent_exec(struct ast_channel *chan, const char *data)
{
char *parse;
int x;

View File

@ -72,7 +72,7 @@ static char *app_log = "Log";
***/
static int verbose_exec(struct ast_channel *chan, void *data)
static int verbose_exec(struct ast_channel *chan, const char *data)
{
int vsize;
char *parse;
@ -118,7 +118,7 @@ static int verbose_exec(struct ast_channel *chan, void *data)
return 0;
}
static int log_exec(struct ast_channel *chan, void *data)
static int log_exec(struct ast_channel *chan, const char *data)
{
char *parse;
int lnum = -1;

View File

@ -5090,8 +5090,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
return -1;
}
ast_str_set(&tmp, 0, "%s", ext);
ext = ast_str_buffer(tmp);
ext = ast_strdupa(ext);
if ((context = strchr(ext, '@'))) {
*context++ = '\0';
tmpptr = strchr(context, '&');
@ -8947,7 +8946,7 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
return 0;
}
static int vm_execmain(struct ast_channel *chan, void *data)
static int vm_execmain(struct ast_channel *chan, const char *data)
{
/* XXX This is, admittedly, some pretty horrendous code. For some
reason it just seemed a lot easier to do with GOTO's. I feel
@ -9655,7 +9654,7 @@ out:
return res;
}
static int vm_exec(struct ast_channel *chan, void *data)
static int vm_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *tmp;
@ -9787,7 +9786,7 @@ static int append_mailbox(const char *context, const char *box, const char *data
return 0;
}
static int vm_box_exists(struct ast_channel *chan, void *data)
static int vm_box_exists(struct ast_channel *chan, const char *data)
{
struct ast_vm_user svm;
char *context, *box;
@ -9851,16 +9850,16 @@ static struct ast_custom_function mailbox_exists_acf = {
.read = acf_mailbox_exists,
};
static int vmauthenticate(struct ast_channel *chan, void *data)
static int vmauthenticate(struct ast_channel *chan, const char *data)
{
char *s = data, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION] = "";
char *s, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION] = "";
struct ast_vm_user vmus;
char *options = NULL;
int silent = 0, skipuser = 0;
int res = -1;
if (s) {
s = ast_strdupa(s);
if (data) {
s = ast_strdupa(data);
user = strsep(&s, ",");
options = strsep(&s, ",");
if (user) {

View File

@ -53,7 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app = "WaitForRing";
static int waitforring_exec(struct ast_channel *chan, void *data)
static int waitforring_exec(struct ast_channel *chan, const char *data)
{
struct ast_frame *f;
int res = 0;

View File

@ -202,7 +202,7 @@ static int do_waiting(struct ast_channel *chan, int timereqd, time_t waitstart,
return res;
}
static int waitfor_exec(struct ast_channel *chan, void *data, int wait_for_silence)
static int waitfor_exec(struct ast_channel *chan, const char *data, int wait_for_silence)
{
int res = 1;
int timereqd = 1000;
@ -232,12 +232,12 @@ static int waitfor_exec(struct ast_channel *chan, void *data, int wait_for_silen
return res;
}
static int waitforsilence_exec(struct ast_channel *chan, void *data)
static int waitforsilence_exec(struct ast_channel *chan, const char *data)
{
return waitfor_exec(chan, data, 1);
}
static int waitfornoise_exec(struct ast_channel *chan, void *data)
static int waitfornoise_exec(struct ast_channel *chan, const char *data)
{
return waitfor_exec(chan, data, 0);
}

View File

@ -67,7 +67,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app = "WaitUntil";
static int waituntil_exec(struct ast_channel *chan, void *data)
static int waituntil_exec(struct ast_channel *chan, const char *data)
{
int res;
double fraction;

View File

@ -186,7 +186,7 @@ static int find_matching_endwhile(struct ast_channel *chan)
return res;
}
static int _while_exec(struct ast_channel *chan, void *data, int end)
static int _while_exec(struct ast_channel *chan, const char *data, int end)
{
int res=0;
const char *while_pri = NULL;
@ -296,19 +296,19 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
return res;
}
static int while_start_exec(struct ast_channel *chan, void *data) {
static int while_start_exec(struct ast_channel *chan, const char *data) {
return _while_exec(chan, data, 0);
}
static int while_end_exec(struct ast_channel *chan, void *data) {
static int while_end_exec(struct ast_channel *chan, const char *data) {
return _while_exec(chan, data, 1);
}
static int while_exit_exec(struct ast_channel *chan, void *data) {
static int while_exit_exec(struct ast_channel *chan, const char *data) {
return _while_exec(chan, data, 2);
}
static int while_continue_exec(struct ast_channel *chan, void *data)
static int while_continue_exec(struct ast_channel *chan, const char *data)
{
int x;
const char *prefix = "WHILE", *while_pri=NULL;

View File

@ -74,7 +74,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app = "Zapateller";
static int zapateller_exec(struct ast_channel *chan, void *data)
static int zapateller_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
int i, answer = 0, nocallerid = 0;

View File

@ -282,7 +282,6 @@ static int free_config(void)
static SQLHSTMT generic_prepare(struct odbc_obj *obj, void *data)
{
int res, i;
char *sql = data;
SQLHSTMT stmt;
SQLINTEGER nativeerror = 0, numfields = 0;
SQLSMALLINT diagbytes = 0;
@ -294,9 +293,9 @@ static SQLHSTMT generic_prepare(struct odbc_obj *obj, void *data)
return NULL;
}
res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
res = SQLPrepare(stmt, (unsigned char *) data, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", (char *) data);
SQLGetDiagField(SQL_HANDLE_STMT, stmt, 1, SQL_DIAG_NUMBER, &numfields, SQL_IS_INTEGER, &diagbytes);
for (i = 0; i < numfields; i++) {
SQLGetDiagRec(SQL_HANDLE_STMT, stmt, i + 1, state, &nativeerror, diagnostic, sizeof(diagnostic), &diagbytes);

View File

@ -61,7 +61,7 @@ static sqlite* db = NULL;
AST_MUTEX_DEFINE_STATIC(sqlite_lock);
/*! \brief SQL table format */
static char sql_create_table[] = "CREATE TABLE cdr ("
static const char sql_create_table[] = "CREATE TABLE cdr ("
" AcctId INTEGER PRIMARY KEY,"
" clid VARCHAR(80),"
" src VARCHAR(80),"

View File

@ -56,8 +56,8 @@ AST_MUTEX_DEFINE_STATIC(lock);
static const char config_file[] = "cdr_sqlite3_custom.conf";
static char *desc = "Customizable SQLite3 CDR Backend";
static char *name = "cdr_sqlite3_custom";
static const char desc[] = "Customizable SQLite3 CDR Backend";
static const char name[] = "cdr_sqlite3_custom";
static sqlite3 *db = NULL;
static char table[80];

View File

@ -1708,7 +1708,7 @@ static int agent_logoff(const char *agent, int soft)
static char *agent_logoff_cmd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
int ret;
char *agent;
const char *agent;
switch (cmd) {
case CLI_INIT:
@ -1956,7 +1956,7 @@ static struct ast_cli_entry cli_agents[] = {
* \returns
* \sa agentmonitoroutgoing_exec(), load_module().
*/
static int login_exec(struct ast_channel *chan, void *data)
static int login_exec(struct ast_channel *chan, const char *data)
{
int res=0;
int tries = 0;
@ -2284,7 +2284,7 @@ static int login_exec(struct ast_channel *chan, void *data)
* \returns
* \sa login_exec(), load_module().
*/
static int agentmonitoroutgoing_exec(struct ast_channel *chan, void *data)
static int agentmonitoroutgoing_exec(struct ast_channel *chan, const char *data)
{
int exitifnoagentid = 0;
int nowarnings = 0;

View File

@ -782,7 +782,7 @@ static char *console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_args
{
char tmp[256], *tmp2;
char *mye, *myc;
char *d;
const char *d;
char *res = CLI_SUCCESS;
switch (cmd) {

View File

@ -797,6 +797,7 @@ static char *cli_console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_a
if (pvt->owner) { /* already in a call */
int i;
struct ast_frame f = { AST_FRAME_DTMF, 0 };
const char *s;
if (a->argc == e->args) { /* argument is mandatory here */
ast_cli(a->fd, "Already in a call. You can only dial digits until you hangup.\n");
@ -883,7 +884,7 @@ static char *cli_console_hangup(struct ast_cli_entry *e, int cmd, struct ast_cli
static char *cli_console_mute(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *s;
const char *s;
struct console_pvt *pvt = get_active_pvt();
char *res = CLI_SUCCESS;

View File

@ -620,7 +620,7 @@ struct dahdi_distRings {
struct ringContextData ringContext[3];
};
static char *subnames[] = {
static const char * const subnames[] = {
"Real",
"Callwait",
"Threeway"
@ -2364,7 +2364,7 @@ out:
return res;
}
static char *events[] = {
static const char * const events[] = {
"No event",
"On hook",
"Ring/Answered",
@ -2409,7 +2409,7 @@ static char *alarm2str(int alm)
return alm ? "Unknown Alarm" : "No Alarm";
}
static char *event2str(int event)
static const char *event2str(int event)
{
static char buf[256];
if ((event < (ARRAY_LEN(events))) && (event > -1))
@ -3987,11 +3987,11 @@ static void destroy_all_channels(void)
#if defined(HAVE_PRI)
static char *dahdi_send_keypad_facility_app = "DAHDISendKeypadFacility";
static int dahdi_send_keypad_facility_exec(struct ast_channel *chan, void *data)
static int dahdi_send_keypad_facility_exec(struct ast_channel *chan, const char *data)
{
/* Data will be our digit string */
struct dahdi_pvt *p;
char *digits = (char *) data;
const char *digits = (const char *) data;
if (ast_strlen_zero(digits)) {
ast_debug(1, "No digit string sent to application!\n");
@ -4032,7 +4032,7 @@ static int dahdi_send_keypad_facility_exec(struct ast_channel *chan, void *data)
#if defined(HAVE_PRI_PROG_W_CAUSE)
static char *dahdi_send_callrerouting_facility_app = "DAHDISendCallreroutingFacility";
static int dahdi_send_callrerouting_facility_exec(struct ast_channel *chan, void *data)
static int dahdi_send_callrerouting_facility_exec(struct ast_channel *chan, const char *data)
{
/* Data will be our digit string */
struct dahdi_pvt *p;

View File

@ -1051,7 +1051,7 @@ static int iax2_fixup(struct ast_channel *oldchannel, struct ast_channel *newcha
static int iax2_hangup(struct ast_channel *c);
static int iax2_indicate(struct ast_channel *c, int condition, const void *data, size_t datalen);
static int iax2_poke_peer(struct iax2_peer *peer, int heldcall);
static int iax2_provision(struct sockaddr_in *end, int sockfd, char *dest, const char *template, int force);
static int iax2_provision(struct sockaddr_in *end, int sockfd, const char *dest, const char *template, int force);
static int iax2_send(struct chan_iax2_pvt *pvt, struct ast_frame *f, unsigned int ts, int seqno, int now, int transfer, int final);
static int iax2_sendhtml(struct ast_channel *c, int subclass, const char *data, int datalen);
static int iax2_sendimage(struct ast_channel *c, struct ast_frame *img);
@ -2660,7 +2660,7 @@ static char *handle_cli_iax2_prune_realtime(struct ast_cli_entry *e, int cmd, st
{
struct iax2_peer *peer = NULL;
struct iax2_user *user = NULL;
static char *choices[] = { "all", NULL };
static const char * const choices[] = { "all", NULL };
char *cmplt;
switch (cmd) {
@ -5377,7 +5377,7 @@ static char *handle_cli_iax2_show_users(struct ast_cli_entry *e, int cmd, struct
#undef FORMAT2
}
static int __iax2_show_peers(int manager, int fd, struct mansession *s, int argc, char *argv[])
static int __iax2_show_peers(int manager, int fd, struct mansession *s, const int argc, const char * const argv[])
{
regex_t regexbuf;
int havepattern = 0;
@ -5708,14 +5708,14 @@ static char *handle_cli_iax2_show_firmware(struct ast_cli_entry *e, int cmd, str
/*! \brief callback to display iax peers in manager */
static int manager_iax2_show_peers(struct mansession *s, const struct message *m)
{
char *a[] = { "iax2", "show", "users" };
static const char * const a[] = { "iax2", "show", "peers" };
const char *id = astman_get_header(m,"ActionID");
char idtext[256] = "";
if (!ast_strlen_zero(id))
snprintf(idtext, sizeof(idtext), "ActionID: %s\r\n", id);
astman_send_ack(s, m, "Peer status list will follow");
return __iax2_show_peers(1, -1, s, 3, a );
return __iax2_show_peers(1, -1, s, 3, a);
}
/*! \brief callback to display iax peers in manager format */
@ -7987,9 +7987,6 @@ static int iax_park(struct ast_channel *chan1, struct ast_channel *chan2)
return -1;
}
static int iax2_provision(struct sockaddr_in *end, int sockfd, char *dest, const char *template, int force);
static int check_provisioning(struct sockaddr_in *sin, int sockfd, char *si, unsigned int ver)
{
unsigned int ourver;
@ -10279,7 +10276,7 @@ static int iax2_do_register(struct iax2_registry *reg)
return 0;
}
static int iax2_provision(struct sockaddr_in *end, int sockfd, char *dest, const char *template, int force)
static int iax2_provision(struct sockaddr_in *end, int sockfd, const char *dest, const char *template, int force)
{
/* Returns 1 if provisioned, -1 if not able to find destination, or 0 if no provisioning
is found for template */
@ -10331,7 +10328,7 @@ static char *papp = "IAX2Provision";
/*! iax2provision
\ingroup applications
*/
static int iax2_prov_app(struct ast_channel *chan, void *data)
static int iax2_prov_app(struct ast_channel *chan, const char *data)
{
int res;
char *sdata;

View File

@ -119,7 +119,7 @@ static const char config[] = "mgcp.conf";
#define MGCP_CX_INACTIVE 4
/*! } */
static char *mgcp_cxmodes[] = {
static const char * const mgcp_cxmodes[] = {
"sendonly",
"recvonly",
"sendrecv",
@ -1098,7 +1098,7 @@ static char *handle_mgcp_audit_endpoint(struct ast_cli_entry *e, int cmd, struct
if (a->argc != 4)
return CLI_SHOWUSAGE;
/* split the name into parts by null */
ename = a->argv[3];
ename = ast_strdupa(a->argv[3]);
gname = ename;
while (*gname) {
if (*gname == '@') {
@ -1919,7 +1919,7 @@ static int process_sdp(struct mgcp_subchannel *sub, struct mgcp_request *req)
return 0;
}
static int add_header(struct mgcp_request *req, char *var, char *value)
static int add_header(struct mgcp_request *req, const char *var, const char *value)
{
if (req->len >= sizeof(req->data) - 4) {
ast_log(LOG_WARNING, "Out of space, can't add anymore\n");

View File

@ -711,11 +711,11 @@ static void release_chan(struct misdn_bchannel *bc);
#if defined(AST_MISDN_ENHANCEMENTS)
static const char misdn_command_name[] = "misdn_command";
static int misdn_command_exec(struct ast_channel *chan, void *data);
static int misdn_command_exec(struct ast_channel *chan, const char *data);
#endif /* defined(AST_MISDN_ENHANCEMENTS) */
static int misdn_check_l2l1(struct ast_channel *chan, void *data);
static int misdn_set_opt_exec(struct ast_channel *chan, void *data);
static int misdn_facility_exec(struct ast_channel *chan, void *data);
static int misdn_check_l2l1(struct ast_channel *chan, const char *data);
static int misdn_set_opt_exec(struct ast_channel *chan, const char *data);
static int misdn_facility_exec(struct ast_channel *chan, const char *data);
int chan_misdn_jb_empty(struct misdn_bchannel *bc, char *buf, int len);
@ -748,7 +748,7 @@ static struct chan_list *get_chan_by_ast(struct ast_channel *ast)
return NULL;
}
static struct chan_list *get_chan_by_ast_name(char *name)
static struct chan_list *get_chan_by_ast_name(const char *name)
{
struct chan_list *tmp;
@ -4025,7 +4025,7 @@ struct state_struct {
char txt[255];
};
static struct state_struct state_array[] = {
static const struct state_struct state_array[] = {
/* *INDENT-OFF* */
{ MISDN_NOTHING, "NOTHING" }, /* at beginning */
{ MISDN_WAITING4DIGS, "WAITING4DIGS" }, /* when waiting for infos */
@ -5125,11 +5125,11 @@ static const struct FacParm Fac_Msgs[] = {
static char *handle_cli_misdn_send_facility(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *channame;
char *nr;
const char *channame;
const char *nr;
struct chan_list *tmp;
int port;
char *served_nr;
const char *served_nr;
struct misdn_bchannel dummy, *bc=&dummy;
unsigned max_len;
@ -5381,8 +5381,8 @@ static char *handle_cli_misdn_send_restart(struct ast_cli_entry *e, int cmd, str
static char *handle_cli_misdn_send_digit(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *channame;
char *msg;
const char *channame;
const char *msg;
struct chan_list *tmp;
int i, msglen;
@ -5430,7 +5430,7 @@ static char *handle_cli_misdn_send_digit(struct ast_cli_entry *e, int cmd, struc
static char *handle_cli_misdn_toggle_echocancel(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *channame;
const char *channame;
struct chan_list *tmp;
switch (cmd) {
@ -5476,8 +5476,8 @@ static char *handle_cli_misdn_toggle_echocancel(struct ast_cli_entry *e, int cmd
static char *handle_cli_misdn_send_display(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *channame;
char *msg;
const char *channame;
const char *msg;
struct chan_list *tmp;
switch (cmd) {
@ -11357,7 +11357,7 @@ static const struct misdn_command_table misdn_commands[] = {
* \retval 0 on success.
* \retval -1 on error.
*/
static int misdn_command_exec(struct ast_channel *chan, void *data)
static int misdn_command_exec(struct ast_channel *chan, const char *data)
{
char *parse;
unsigned index;
@ -11397,7 +11397,7 @@ static int misdn_command_exec(struct ast_channel *chan, void *data)
}
#endif /* defined(AST_MISDN_ENHANCEMENTS) */
static int misdn_facility_exec(struct ast_channel *chan, void *data)
static int misdn_facility_exec(struct ast_channel *chan, const char *data)
{
struct chan_list *ch = MISDN_ASTERISK_TECH_PVT(chan);
char *parse;
@ -11476,7 +11476,7 @@ static int misdn_facility_exec(struct ast_channel *chan, void *data)
return 0;
}
static int misdn_check_l2l1(struct ast_channel *chan, void *data)
static int misdn_check_l2l1(struct ast_channel *chan, const char *data)
{
char *parse;
char group[BUFFERSIZE + 1];
@ -11550,7 +11550,7 @@ static int misdn_check_l2l1(struct ast_channel *chan, void *data)
return 0;
}
static int misdn_set_opt_exec(struct ast_channel *chan, void *data)
static int misdn_set_opt_exec(struct ast_channel *chan, const char *data)
{
struct chan_list *ch = MISDN_ASTERISK_TECH_PVT(chan);
char *tok;

View File

@ -53,7 +53,7 @@ static const char tdesc[] = "Network Broadcast Sound Driver";
static int prefformat = AST_FORMAT_SLINEAR;
static char context[AST_MAX_EXTENSION] = "default";
static char type[] = "NBS";
static const char type[] = "NBS";
/* NBS creates private structures on demand */

View File

@ -305,7 +305,7 @@ struct chan_oss_pvt {
};
/*! forward declaration */
static struct chan_oss_pvt *find_desc(char *dev);
static struct chan_oss_pvt *find_desc(const char *dev);
static char *oss_active; /*!< the active device */
@ -367,7 +367,7 @@ static struct ast_channel_tech oss_tech = {
/*!
* \brief returns a pointer to the descriptor with the given name
*/
static struct chan_oss_pvt *find_desc(char *dev)
static struct chan_oss_pvt *find_desc(const char *dev)
{
struct chan_oss_pvt *o = NULL;
@ -1075,7 +1075,8 @@ static char *console_flash(struct ast_cli_entry *e, int cmd, struct ast_cli_args
static char *console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *s = NULL, *mye = NULL, *myc = NULL;
char *s = NULL;
char *mye = NULL, *myc = NULL;
struct chan_oss_pvt *o = find_desc(oss_active);
if (cmd == CLI_INIT) {
@ -1092,6 +1093,7 @@ static char *console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_args
if (o->owner) { /* already in a call */
int i;
struct ast_frame f = { AST_FRAME_DTMF, 0 };
const char *s;
if (a->argc == e->args) { /* argument is mandatory here */
ast_cli(a->fd, "Already in a call. You can only dial digits until you hangup.\n");
@ -1126,7 +1128,7 @@ static char *console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_args
static char *console_mute(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
struct chan_oss_pvt *o = find_desc(oss_active);
char *s;
const char *s;
int toggle = 0;
if (cmd == CLI_INIT) {

View File

@ -2348,7 +2348,7 @@ static void free_old_route(struct sip_route *route);
static void list_route(struct sip_route *route);
static void build_route(struct sip_pvt *p, struct sip_request *req, int backwards);
static enum check_auth_result register_verify(struct sip_pvt *p, struct sockaddr_in *sin,
struct sip_request *req, char *uri);
struct sip_request *req, const char *uri);
static struct sip_pvt *get_sip_pvt_byid_locked(const char *callid, const char *totag, const char *fromtag);
static void check_pendings(struct sip_pvt *p);
static void *sip_park_thread(void *stuff);
@ -2376,11 +2376,11 @@ static int reply_digest(struct sip_pvt *p, struct sip_request *req, char *header
static int build_reply_digest(struct sip_pvt *p, int method, char *digest, int digest_len);
static enum check_auth_result check_auth(struct sip_pvt *p, struct sip_request *req, const char *username,
const char *secret, const char *md5secret, int sipmethod,
char *uri, enum xmittype reliable, int ignore);
const char *uri, enum xmittype reliable, int ignore);
static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_request *req,
int sipmethod, char *uri, enum xmittype reliable,
int sipmethod, const char *uri, enum xmittype reliable,
struct sockaddr_in *sin, struct sip_peer **authpeer);
static int check_user(struct sip_pvt *p, struct sip_request *req, int sipmethod, char *uri, enum xmittype reliable, struct sockaddr_in *sin);
static int check_user(struct sip_pvt *p, struct sip_request *req, int sipmethod, const char *uri, enum xmittype reliable, struct sockaddr_in *sin);
/*--- Domain handling */
static int check_sip_domain(const char *domain, char *context, size_t len); /* Check if domain is one of our local domains */
@ -2485,13 +2485,13 @@ static char *complete_sipnotify(const char *line, const char *word, int pos, int
static char *sip_show_channel(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static char *sip_show_channelstats(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static char *sip_show_history(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static char *sip_do_debug_ip(int fd, char *arg);
static char *sip_do_debug_peer(int fd, char *arg);
static char *sip_do_debug_ip(int fd, const char *arg);
static char *sip_do_debug_peer(int fd, const char *arg);
static char *sip_do_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static char *sip_cli_notify(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static char *sip_set_history(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static int sip_dtmfmode(struct ast_channel *chan, void *data);
static int sip_addheader(struct ast_channel *chan, void *data);
static int sip_dtmfmode(struct ast_channel *chan, const char *data);
static int sip_addheader(struct ast_channel *chan, const char *data);
static int sip_do_reload(enum channelreloadreason reason);
static char *sip_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static int acf_channel_read(struct ast_channel *chan, const char *funcname, char *preparse, char *buf, size_t buflen);
@ -2619,26 +2619,26 @@ static void build_contact(struct sip_pvt *p);
/*------Request handling functions */
static int handle_incoming(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int *recount, int *nounlock);
static int handle_request_update(struct sip_pvt *p, struct sip_request *req);
static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, struct sockaddr_in *sin, int *recount, char *e, int *nounlock);
static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, struct sockaddr_in *sin, int *recount, const char *e, int *nounlock);
static int handle_request_refer(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, int *nounlock);
static int handle_request_bye(struct sip_pvt *p, struct sip_request *req);
static int handle_request_register(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, char *e);
static int handle_request_register(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, const char *e);
static int handle_request_cancel(struct sip_pvt *p, struct sip_request *req);
static int handle_request_message(struct sip_pvt *p, struct sip_request *req);
static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int seqno, char *e);
static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int seqno, const char *e);
static void handle_request_info(struct sip_pvt *p, struct sip_request *req);
static int handle_request_options(struct sip_pvt *p, struct sip_request *req);
static int handle_invite_replaces(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, struct sockaddr_in *sin);
static int handle_request_notify(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int seqno, char *e);
static int handle_request_notify(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int seqno, const char *e);
static int local_attended_transfer(struct sip_pvt *transferer, struct sip_dual *current, struct sip_request *req, int seqno);
/*------Response handling functions */
static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno);
static void handle_response_notify(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno);
static void handle_response_refer(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno);
static void handle_response_subscribe(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno);
static int handle_response_register(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno);
static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno);
static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno);
static void handle_response_notify(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno);
static void handle_response_refer(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno);
static void handle_response_subscribe(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno);
static int handle_response_register(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno);
static void handle_response(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno);
/*------ T38 Support --------- */
static int transmit_response_with_t38_sdp(struct sip_pvt *p, char *msg, struct sip_request *req, int retrans);
@ -6598,9 +6598,9 @@ static const char *__get_header(const struct sip_request *req, const char *name,
for (pass = 0; name && pass < 2;pass++) {
int x, len = strlen(name);
for (x = *start; x < req->headers; x++) {
char *header = REQ_OFFSET_TO_STR(req, header[x]);
const char *header = REQ_OFFSET_TO_STR(req, header[x]);
if (!strncasecmp(header, name, len)) {
char *r = header + len; /* skip name */
const char *r = header + len; /* skip name */
if (sip_cfg.pedanticsipchecking)
r = ast_skip_blanks(r);
@ -7545,7 +7545,7 @@ static int find_sdp(struct sip_request *req)
sdp part and the end boundry if it exists */
for (x = 0; x < (req->lines); x++) {
char *line = REQ_OFFSET_TO_STR(req, line[x]);
const char *line = REQ_OFFSET_TO_STR(req, line[x]);
if (!strncasecmp(line, boundary, strlen(boundary))){
if (found_application_sdp && found_end_of_headers) {
req->sdp_end = x-1;
@ -10859,7 +10859,7 @@ static int manager_sipnotify(struct mansession *s, const struct message *m)
return 0;
}
static char mandescr_sipnotify[] =
static const char mandescr_sipnotify[] =
"Description: Sends a SIP Notify event\n"
"All parameters for this event must be specified in the body of this request\n"
"via multiple Variable: name=value sequences.\n"
@ -12039,7 +12039,7 @@ AST_THREADSTORAGE(check_auth_buf);
*/
static enum check_auth_result check_auth(struct sip_pvt *p, struct sip_request *req, const char *username,
const char *secret, const char *md5secret, int sipmethod,
char *uri, enum xmittype reliable, int ignore)
const char *uri, enum xmittype reliable, int ignore)
{
const char *response;
char *reqheader, *respheader;
@ -12404,15 +12404,16 @@ static char *terminate_uri(char *uri)
- Registration requests are only matched with peers that are marked as "dynamic"
*/
static enum check_auth_result register_verify(struct sip_pvt *p, struct sockaddr_in *sin,
struct sip_request *req, char *uri)
struct sip_request *req, const char *uri)
{
enum check_auth_result res = AUTH_NOT_FOUND;
struct sip_peer *peer;
char tmp[256];
char *name, *c;
char *domain;
char *uri2 = ast_strdupa(uri);
terminate_uri(uri); /* warning, overwrite the string */
terminate_uri(uri2);
ast_copy_string(tmp, get_header(req, "To"), sizeof(tmp));
if (sip_cfg.pedanticsipchecking)
@ -12472,7 +12473,7 @@ static enum check_auth_result register_verify(struct sip_pvt *p, struct sockaddr
ast_copy_flags(&p->flags[0], &peer->flags[0], SIP_NAT);
if (ast_test_flag(&p->flags[1], SIP_PAGE2_REGISTERTRYING))
transmit_response(p, "100 Trying", req);
if (!(res = check_auth(p, req, peer->name, peer->secret, peer->md5secret, SIP_REGISTER, uri, XMIT_UNRELIABLE, req->ignore))) {
if (!(res = check_auth(p, req, peer->name, peer->secret, peer->md5secret, SIP_REGISTER, uri2, XMIT_UNRELIABLE, req->ignore))) {
if (sip_cancel_destroy(p))
ast_log(LOG_WARNING, "Unable to cancel SIP destruction. Expect bad things.\n");
@ -13695,7 +13696,7 @@ static enum check_auth_result check_peer_ok(struct sip_pvt *p, char *of,
\return 0 on success, non-zero on failure
*/
static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_request *req,
int sipmethod, char *uri, enum xmittype reliable,
int sipmethod, const char *uri, enum xmittype reliable,
struct sockaddr_in *sin, struct sip_peer **authpeer)
{
char from[256];
@ -13813,7 +13814,7 @@ static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_requ
/*! \brief Find user
If we get a match, this will add a reference pointer to the user object in ASTOBJ, that needs to be unreferenced
*/
static int check_user(struct sip_pvt *p, struct sip_request *req, int sipmethod, char *uri, enum xmittype reliable, struct sockaddr_in *sin)
static int check_user(struct sip_pvt *p, struct sip_request *req, int sipmethod, const char *uri, enum xmittype reliable, struct sockaddr_in *sin)
{
return check_user_full(p, req, sipmethod, uri, reliable, sin, NULL);
}
@ -13830,7 +13831,7 @@ static int get_msg_text(char *buf, int len, struct sip_request *req, int addnewl
if (y < 0)
y = 0;
for (x = 0; x < req->lines; x++) {
char *line = REQ_OFFSET_TO_STR(req, line[x]);
const char *line = REQ_OFFSET_TO_STR(req, line[x]);
strncat(buf, line, y); /* safe */
y -= strlen(line) + 1;
if (y < 0)
@ -13949,7 +13950,7 @@ static char *transfermode2str(enum transfermodes mode)
return "strict";
}
static struct _map_x_s natmodes[] = {
static const struct _map_x_s natmodes[] = {
{ SIP_NAT_NEVER, "No"},
{ SIP_NAT_ROUTE, "Route"},
{ SIP_NAT_ALWAYS, "Always"},
@ -13968,7 +13969,7 @@ static const char *nat2str(int nat)
delete it. Keeping it enabled generates compiler warnings.
*/
static struct _map_x_s natcfgmodes[] = {
static const struct _map_x_s natcfgmodes[] = {
{ SIP_NAT_NEVER, "never"},
{ SIP_NAT_ROUTE, "route"},
{ SIP_NAT_ALWAYS, "yes"},
@ -13989,7 +13990,7 @@ static const char *nat2strconfig(int nat)
/* Session-Timer Modes */
static struct _map_x_s stmodes[] = {
static const struct _map_x_s stmodes[] = {
{ SESSION_TIMER_MODE_ACCEPT, "Accept"},
{ SESSION_TIMER_MODE_ORIGINATE, "Originate"},
{ SESSION_TIMER_MODE_REFUSE, "Refuse"},
@ -14007,7 +14008,7 @@ static enum st_mode str2stmode(const char *s)
}
/* Session-Timer Refreshers */
static struct _map_x_s strefreshers[] = {
static const struct _map_x_s strefreshers[] = {
{ SESSION_TIMER_REFRESHER_AUTO, "auto"},
{ SESSION_TIMER_REFRESHER_UAC, "uac"},
{ SESSION_TIMER_REFRESHER_UAS, "uas"},
@ -14166,7 +14167,7 @@ static char *sip_show_users(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
}
/*! \brief Manager Action SIPShowRegistry description */
static char mandescr_show_registry[] =
static const char mandescr_show_registry[] =
"Description: Lists all registration requests and status\n"
"Registrations will follow as separate events. followed by a final event called\n"
"RegistrationsComplete.\n"
@ -14211,7 +14212,7 @@ static int manager_show_registry(struct mansession *s, const struct message *m)
return 0;
}
static char mandescr_show_peers[] =
static const char mandescr_show_peers[] =
"Description: Lists SIP peers in text format with details on current status.\n"
"Peerlist will follow as separate events, followed by a final event called\n"
"PeerlistComplete.\n"
@ -14447,10 +14448,10 @@ static int peer_dump_func(void *userobj, void *arg, int flags)
{
struct sip_peer *peer = userobj;
int refc = ao2_t_ref(userobj, 0, "");
int *fd = arg;
struct ast_cli_args *a = (struct ast_cli_args *) arg;
ast_cli(*fd, "name: %s\ntype: peer\nobjflags: %d\nrefcount: %d\n\n",
peer->name, 0, refc);
ast_cli(a->fd, "name: %s\ntype: peer\nobjflags: %d\nrefcount: %d\n\n",
peer->name, 0, refc);
return 0;
}
@ -14458,10 +14459,10 @@ static int dialog_dump_func(void *userobj, void *arg, int flags)
{
struct sip_pvt *pvt = userobj;
int refc = ao2_t_ref(userobj, 0, "");
int *fd = arg;
struct ast_cli_args *a = (struct ast_cli_args *) arg;
ast_cli(*fd, "name: %s\ntype: dialog\nobjflags: %d\nrefcount: %d\n\n",
pvt->callid, 0, refc);
ast_cli(a->fd, "name: %s\ntype: dialog\nobjflags: %d\nrefcount: %d\n\n",
pvt->callid, 0, refc);
return 0;
}
@ -14485,22 +14486,22 @@ static char *sip_show_objects(struct ast_cli_entry *e, int cmd, struct ast_cli_a
if (a->argc != 3)
return CLI_SHOWUSAGE;
ast_cli(a->fd, "-= Peer objects: %d static, %d realtime, %d autocreate =-\n\n", speerobjs, rpeerobjs, apeerobjs);
ao2_t_callback(peers, OBJ_NODATA, peer_dump_func, &a->fd, "initiate ao2_callback to dump peers");
ao2_t_callback(peers, OBJ_NODATA, peer_dump_func, a, "initiate ao2_callback to dump peers");
ast_cli(a->fd, "-= Registry objects: %d =-\n\n", regobjs);
ASTOBJ_CONTAINER_DUMP(a->fd, tmp, sizeof(tmp), &regl);
ast_cli(a->fd, "-= Dialog objects:\n\n");
ao2_t_callback(dialogs, OBJ_NODATA, dialog_dump_func, &a->fd, "initiate ao2_callback to dump dialogs");
ao2_t_callback(dialogs, OBJ_NODATA, dialog_dump_func, a, "initiate ao2_callback to dump dialogs");
return CLI_SUCCESS;
}
/*! \brief Print call group and pickup group */
static void print_group(int fd, ast_group_t group, int crlf)
static void print_group(int fd, ast_group_t group, int crlf)
{
char buf[256];
ast_cli(fd, crlf ? "%s\r\n" : "%s\n", ast_print_group(buf, sizeof(buf), group) );
}
/*! \brief mapping between dtmf flags and strings */
static struct _map_x_s dtmfstr[] = {
static const struct _map_x_s dtmfstr[] = {
{ SIP_DTMF_RFC2833, "rfc2833" },
{ SIP_DTMF_INFO, "info" },
{ SIP_DTMF_SHORTINFO, "shortinfo" },
@ -14521,7 +14522,7 @@ static int str2dtmfmode(const char *str)
return map_s_x(dtmfstr, str, -1);
}
static struct _map_x_s insecurestr[] = {
static const struct _map_x_s insecurestr[] = {
{ SIP_INSECURE_PORT, "port" },
{ SIP_INSECURE_INVITE, "invite" },
{ SIP_INSECURE_PORT | SIP_INSECURE_INVITE, "port,invite" },
@ -14644,10 +14645,10 @@ static char *sip_prune_realtime(struct ast_cli_entry *e, int cmd, struct ast_cli
struct sip_peer *peer, *pi;
int prunepeer = FALSE;
int multi = FALSE;
char *name = NULL;
const char *name = NULL;
regex_t regexbuf;
struct ao2_iterator i;
static char *choices[] = { "all", "like", NULL };
static const char * const choices[] = { "all", "like", NULL };
char *cmplt;
if (cmd == CLI_INIT) {
@ -14836,7 +14837,7 @@ static char *sip_show_domains(struct ast_cli_entry *e, int cmd, struct ast_cli_a
}
#undef FORMAT
static char mandescr_show_peer[] =
static const char mandescr_show_peer[] =
"Description: Show one SIP peer with details on current status.\n"
"Variables: \n"
" Peer: <name> The peer name you want to check.\n"
@ -16393,14 +16394,14 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req)
}
/*! \brief Enable SIP Debugging for a single IP */
static char *sip_do_debug_ip(int fd, char *arg)
static char *sip_do_debug_ip(int fd, const char *arg)
{
struct hostent *hp;
struct ast_hostent ahp;
int port = 0;
char *p;
p = arg;
p = ast_strdupa(arg);
strsep(&p, ":");
if (p)
port = atoi(p);
@ -16422,7 +16423,7 @@ static char *sip_do_debug_ip(int fd, char *arg)
}
/*! \brief Turn on SIP debugging for a given peer */
static char *sip_do_debug_peer(int fd, char *arg)
static char *sip_do_debug_peer(int fd, const char *arg)
{
struct sip_peer *peer = find_peer(arg, NULL, TRUE, FINDPEERS, FALSE);
if (!peer)
@ -16446,7 +16447,7 @@ static char *sip_do_debug_peer(int fd, char *arg)
static char *sip_do_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
int oldsipdebug = sipdebug & sip_debug_console;
char *what;
const char *what;
if (cmd == CLI_INIT) {
e->command = "sip set debug {on|off|ip|peer}";
@ -17310,7 +17311,7 @@ static int sip_reinvite_retry(const void *data)
*
* This function is only called upon the receipt of a 401/407 response to an UPDATE.
*/
static void handle_response_update(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno)
static void handle_response_update(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno)
{
if (p->options) {
p->options->auth_type = (resp == 401 ? WWW_AUTH : PROXY_AUTH);
@ -17321,7 +17322,7 @@ static void handle_response_update(struct sip_pvt *p, int resp, char *rest, stru
}
/*! \brief Handle SIP response to INVITE dialogue */
static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno)
static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno)
{
int outgoing = ast_test_flag(&p->flags[0], SIP_OUTGOING);
int res = 0;
@ -17689,7 +17690,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
/* \brief Handle SIP response in NOTIFY transaction
We've sent a NOTIFY, now handle responses to it
*/
static void handle_response_notify(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno)
static void handle_response_notify(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno)
{
switch (resp) {
case 200: /* Notify accepted */
@ -17732,7 +17733,7 @@ static void handle_response_notify(struct sip_pvt *p, int resp, char *rest, stru
}
/* \brief Handle SIP response in SUBSCRIBE transaction */
static void handle_response_subscribe(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno)
static void handle_response_subscribe(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno)
{
struct sip_peer *peer;
if (!p->mwi) {
@ -17803,7 +17804,7 @@ static void handle_response_subscribe(struct sip_pvt *p, int resp, char *rest, s
/* \brief Handle SIP response in REFER transaction
We've sent a REFER, now handle responses to it
*/
static void handle_response_refer(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno)
static void handle_response_refer(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno)
{
enum ast_control_transfer message = AST_TRANSFER_FAILED;
@ -17874,7 +17875,7 @@ static void handle_response_refer(struct sip_pvt *p, int resp, char *rest, struc
}
/*! \brief Handle responses on REGISTER to services */
static int handle_response_register(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno)
static int handle_response_register(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno)
{
int expires, expires_ms;
struct sip_registry *r;
@ -18100,7 +18101,7 @@ static void stop_media_flows(struct sip_pvt *p)
/*! \brief Handle SIP response in dialogue
\note only called by handle_incoming */
static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int seqno)
static void handle_response(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno)
{
struct ast_channel *owner;
int sipmethod;
@ -18810,7 +18811,7 @@ static const char *gettag(const struct sip_request *req, const char *header, cha
}
/*! \brief Handle incoming notifications */
static int handle_request_notify(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int seqno, char *e)
static int handle_request_notify(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int seqno, const char *e)
{
/* This is mostly a skeleton for future improvements */
/* Mostly created to return proper answers on notifications on outbound REFER's */
@ -19517,7 +19518,7 @@ static int handle_request_update(struct sip_pvt *p, struct sip_request *req)
* plan but try to find the active call and masquerade
* into it
*/
static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, struct sockaddr_in *sin, int *recount, char *e, int *nounlock)
static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, struct sockaddr_in *sin, int *recount, const char *e, int *nounlock)
{
int res = 1;
int gotdest;
@ -19580,8 +19581,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
/* If pedantic is on, we need to check the tags. If they're different, this is
in fact a forked call through a SIP proxy somewhere. */
int different;
char *initial_rlPart2 = REQ_OFFSET_TO_STR(&p->initreq, rlPart2);
char *this_rlPart2 = REQ_OFFSET_TO_STR(req, rlPart2);
const char *initial_rlPart2 = REQ_OFFSET_TO_STR(&p->initreq, rlPart2);
const char *this_rlPart2 = REQ_OFFSET_TO_STR(req, rlPart2);
if (sip_cfg.pedanticsipchecking)
different = sip_uri_cmp(initial_rlPart2, this_rlPart2);
else
@ -21013,7 +21014,7 @@ static void add_peer_mwi_subs(struct sip_peer *peer)
}
/*! \brief Handle incoming SUBSCRIBE request */
static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int seqno, char *e)
static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int seqno, const char *e)
{
int gotdest = 0;
int res = 0;
@ -21333,7 +21334,7 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
}
/*! \brief Handle incoming REGISTER request */
static int handle_request_register(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, char *e)
static int handle_request_register(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, const char *e)
{
enum check_auth_result res;
@ -21401,7 +21402,7 @@ static int handle_incoming(struct sip_pvt *p, struct sip_request *req, struct so
int respid;
int res = 0;
int debug = sip_debug_test_pvt(p);
char *e;
const char *e;
int error = 0;
/* Get Method and Cseq */
@ -25058,10 +25059,10 @@ static char *app_sipaddheader = "SIPAddHeader";
static char *app_sipremoveheader = "SIPRemoveHeader";
/*! \brief Set the DTMFmode for an outbound SIP call (application) */
static int sip_dtmfmode(struct ast_channel *chan, void *data)
static int sip_dtmfmode(struct ast_channel *chan, const char *data)
{
struct sip_pvt *p;
char *mode = data;
const char *mode = data;
if (!data) {
ast_log(LOG_WARNING, "This application requires the argument: info, inband, rfc2833\n");
@ -25116,12 +25117,13 @@ static int sip_dtmfmode(struct ast_channel *chan, void *data)
}
/*! \brief Add a SIP header to an outbound INVITE */
static int sip_addheader(struct ast_channel *chan, void *data)
static int sip_addheader(struct ast_channel *chan, const char *data)
{
int no = 0;
int ok = FALSE;
char varbuf[30];
char *inbuf = data, *subbuf;
const char *inbuf = data;
char *subbuf;
if (ast_strlen_zero(inbuf)) {
ast_log(LOG_WARNING, "This application requires the argument: Header\n");
@ -25155,7 +25157,7 @@ static int sip_addheader(struct ast_channel *chan, void *data)
}
/*! \brief Remove SIP headers added previously with SipAddHeader application */
static int sip_removeheader(struct ast_channel *chan, void *data)
static int sip_removeheader(struct ast_channel *chan, const char *data)
{
struct ast_var_t *newvariable;
struct varshead *headp;

View File

@ -1076,7 +1076,7 @@ static int callnums = 1;
#define SKINNY_CX_INACTIVE 4
#if 0
static char *skinny_cxmodes[] = {
static const char * const skinny_cxmodes[] = {
"sendonly",
"recvonly",
"sendrecv",
@ -3049,7 +3049,7 @@ static char *_skinny_show_devices(int fd, int *total, struct mansession *s, cons
return CLI_SUCCESS;
}
static char mandescr_show_devices[] =
static const char mandescr_show_devices[] =
"Description: Lists Skinny devices in text format with details on current status.\n"
"Devicelist will follow as separate events, followed by a final event called\n"
"DevicelistComplete.\n"
@ -3194,7 +3194,7 @@ static char *_skinny_show_device(int type, int fd, struct mansession *s, const s
return CLI_SUCCESS;
}
static char mandescr_show_device[] =
static const char mandescr_show_device[] =
"Description: Show one SKINNY device with details on current status.\n"
"Variables: \n"
" Device: <name> The device name you want to check.\n"
@ -3310,7 +3310,7 @@ static char *_skinny_show_lines(int fd, int *total, struct mansession *s, const
return CLI_SUCCESS;
}
static char mandescr_show_lines[] =
static const char mandescr_show_lines[] =
"Description: Lists Skinny lines in text format with details on current status.\n"
"Linelist will follow as separate events, followed by a final event called\n"
"LinelistComplete.\n"
@ -3502,7 +3502,7 @@ static char *_skinny_show_line(int type, int fd, struct mansession *s, const str
return CLI_SUCCESS;
}
static char mandescr_show_line[] =
static const char mandescr_show_line[] =
"Description: Show one SKINNY line with details on current status.\n"
"Variables: \n"
" Line: <name> The line name you want to check.\n"

View File

@ -502,7 +502,7 @@ static struct unistimsession {
static const unsigned char packet_rcv_discovery[] =
{ 0xff, 0xff, 0xff, 0xff, 0x02, 0x02, 0xff, 0xff, 0xff, 0xff, 0x9e, 0x03, 0x08 };
static unsigned char packet_send_discovery_ack[] =
static const unsigned char packet_send_discovery_ack[] =
{ 0x00, 0x00, /*Initial Seq (2 bytes) */ 0x00, 0x00, 0x00, 0x01 };
static const unsigned char packet_recv_firm_version[] =
@ -733,8 +733,8 @@ static unsigned int get_tick_count(void)
}
/* Send data to a phone without retransmit nor buffering */
static void send_raw_client(int size, unsigned char *data, struct sockaddr_in *addr_to,
const struct sockaddr_in *addr_ourip)
static void send_raw_client(int size, const unsigned char *data, struct sockaddr_in *addr_to,
const struct sockaddr_in *addr_ourip)
{
#ifdef HAVE_PKTINFO
struct iovec msg_iov;
@ -743,7 +743,12 @@ static void send_raw_client(int size, unsigned char *data, struct sockaddr_in *a
struct cmsghdr *ip_msg = (struct cmsghdr *) buffer;
struct in_pktinfo *pki = (struct in_pktinfo *) CMSG_DATA(ip_msg);
msg_iov.iov_base = data;
/* cast this to a non-const pointer, since the sendmsg() API
* does not provide read-only and write-only flavors of the
* structures used for its arguments, but in this case we know
* the data will not be modified
*/
msg_iov.iov_base = (char *) data;
msg_iov.iov_len = size;
msg.msg_name = addr_to; /* optional address */

View File

@ -1505,7 +1505,7 @@ static int kp_match_area(const struct keypad_entry *e, int x, int y)
}
struct _s_k { const char *s; int k; };
static struct _s_k gui_key_map[] = {
static const struct _s_k gui_key_map[] = {
{"FREEZE", KEY_FREEZE},
{"PIP", KEY_PIP},
{"PICK_UP", KEY_PICK_UP },

View File

@ -279,7 +279,7 @@ static struct iax2_ie {
{ IAX_IE_OSPTOKEN, "OSPTOKEN" },
};
static struct iax2_ie prov_ies[] = {
static const struct iax2_ie prov_ies[] = {
{ PROV_IE_USEDHCP, "USEDHCP" },
{ PROV_IE_IPADDR, "IPADDR", dump_ipaddr },
{ PROV_IE_SUBNET, "SUBNET", dump_ipaddr },

View File

@ -136,7 +136,7 @@ void misdn_cfg_update_ptp( void );
void misdn_cfg_get(int port, enum misdn_cfg_elements elem, void* buf, int bufsize);
/* returns the enum element for the given name, returns MISDN_CFG_FIRST if none was found */
enum misdn_cfg_elements misdn_cfg_get_elem (char *name);
enum misdn_cfg_elements misdn_cfg_get_elem (const char *name);
/* fills the buffer with the name of the given config element */
void misdn_cfg_get_name (enum misdn_cfg_elements elem, void *buf, int bufsize);

View File

@ -600,7 +600,7 @@ void misdn_cfg_get(int port, enum misdn_cfg_elements elem, void *buf, int bufsiz
misdn_cfg_unlock();
}
enum misdn_cfg_elements misdn_cfg_get_elem(char *name)
enum misdn_cfg_elements misdn_cfg_get_elem(const char *name)
{
int pos;

View File

@ -1113,7 +1113,7 @@ struct _cm { /* map ffmpeg codec types to asterisk formats */
//struct video_codec_desc *codec_desc;
};
static struct _cm video_formats[] = {
static const struct _cm video_formats[] = {
{ AST_FORMAT_H263_PLUS, CODEC_ID_H263, CM_RD }, /* incoming H263P ? */
{ AST_FORMAT_H263_PLUS, CODEC_ID_H263P, CM_WR },
{ AST_FORMAT_H263, CODEC_ID_H263, CM_RD },
@ -1137,7 +1137,7 @@ static enum CodecID map_video_format(uint32_t ast_format, int rw)
}
/* pointers to supported codecs. We assume the first one to be non null. */
static struct video_codec_desc *supported_codecs[] = {
static const struct video_codec_desc *supported_codecs[] = {
&h263p_codec,
&h264_codec,
&h263_codec,

View File

@ -42,7 +42,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/* silent gsm frame */
/* begin binary data: */
char gsm_silence[] = /* 33 */
static const char gsm_silence[] = /* 33 */
{0xD8,0x20,0xA2,0xE1,0x5A,0x50,0x00,0x49,0x24,0x92,0x49,0x24,0x50,0x00,0x49
,0x24,0x92,0x49,0x24,0x50,0x00,0x49,0x24,0x92,0x49,0x24,0x50,0x00,0x49,0x24
,0x92,0x49,0x24};

View File

@ -255,8 +255,8 @@ static char *handle_cli_devstate_change(struct ast_cli_entry *e, int cmd, struct
return NULL;
case CLI_GENERATE:
{
static char * const cmds[] = { "UNKNOWN", "NOT_INUSE", "INUSE", "BUSY",
"UNAVAILABLE", "RINGING", "RINGINUSE", "ONHOLD", NULL };
static const char * const cmds[] = { "UNKNOWN", "NOT_INUSE", "INUSE", "BUSY",
"UNAVAILABLE", "RINGING", "RINGINUSE", "ONHOLD", NULL };
if (a->pos == e->args + 1)
return ast_cli_complete(a->word, cmds, a->n);

View File

@ -732,7 +732,7 @@ static struct ast_custom_function fetch_function = {
static char *app_odbcfinish = "ODBCFinish";
static int exec_odbcfinish(struct ast_channel *chan, void *data)
static int exec_odbcfinish(struct ast_channel *chan, const char *data)
{
struct ast_datastore *store = ast_channel_datastore_find(chan, &odbc_info, data);
if (!store) /* Already freed; no big deal. */

View File

@ -654,7 +654,7 @@ static void clearvar_prefix(struct ast_channel *chan, const char *prefix)
AST_LIST_TRAVERSE_SAFE_END
}
static int exec_clearhash(struct ast_channel *chan, void *data)
static int exec_clearhash(struct ast_channel *chan, const char *data)
{
char prefix[80];
snprintf(prefix, sizeof(prefix), HASH_PREFIX, data ? (char *)data : "null");

View File

@ -84,7 +84,7 @@ struct ast_jb
/*! \brief Jitterbuffer configuration. */
struct ast_jb_conf conf;
/*! \brief Jitterbuffer implementation to be used. */
struct ast_jb_impl *impl;
const struct ast_jb_impl *impl;
/*! \brief Jitterbuffer object, passed to the implementation. */
void *jbobj;
/*! \brief The time the jitterbuffer was created. */

Some files were not shown because too many files have changed in this diff Show More