mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Opaquify char * and char[] in ast_channel
Review: https://reviewboard.asterisk.org/r/1733/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4541,9 +4541,9 @@ static int dundi_helper(struct ast_channel *chan, const char *context, const cha
|
||||
if (!strcasecmp(exten, "s")) {
|
||||
exten = pbx_builtin_getvar_helper(chan, "ARG1");
|
||||
if (ast_strlen_zero(exten))
|
||||
exten = chan->macroexten;
|
||||
exten = ast_channel_macroexten(chan);
|
||||
if (ast_strlen_zero(exten))
|
||||
exten = chan->exten;
|
||||
exten = ast_channel_exten(chan);
|
||||
if (ast_strlen_zero(exten)) {
|
||||
ast_log(LOG_WARNING, "Called in Macro mode with no ARG1 or MACRO_EXTEN?\n");
|
||||
return -1;
|
||||
@@ -4593,9 +4593,9 @@ static int dundi_exec(struct ast_channel *chan, const char *context, const char
|
||||
if (!strcasecmp(exten, "s")) {
|
||||
exten = pbx_builtin_getvar_helper(chan, "ARG1");
|
||||
if (ast_strlen_zero(exten))
|
||||
exten = chan->macroexten;
|
||||
exten = ast_channel_macroexten(chan);
|
||||
if (ast_strlen_zero(exten))
|
||||
exten = chan->exten;
|
||||
exten = ast_channel_exten(chan);
|
||||
if (ast_strlen_zero(exten)) {
|
||||
ast_log(LOG_WARNING, "Called in Macro mode with no ARG1 or MACRO_EXTEN?\n");
|
||||
return -1;
|
||||
|
@@ -212,8 +212,8 @@ static int lua_pbx_exec(lua_State *L)
|
||||
chan = lua_touserdata(L, -1);
|
||||
lua_pop(L, 1);
|
||||
|
||||
context = ast_strdupa(chan->context);
|
||||
exten = ast_strdupa(chan->exten);
|
||||
context = ast_strdupa(ast_channel_context(chan));
|
||||
exten = ast_strdupa(ast_channel_exten(chan));
|
||||
priority = chan->priority;
|
||||
|
||||
lua_concat_args(L, 2, nargs);
|
||||
@@ -246,13 +246,13 @@ static int lua_pbx_exec(lua_State *L)
|
||||
return lua_error(L);
|
||||
}
|
||||
|
||||
if (strcmp(context, chan->context)) {
|
||||
if (strcmp(context, ast_channel_context(chan))) {
|
||||
lua_pushstring(L, context);
|
||||
lua_pushstring(L, chan->context);
|
||||
lua_pushstring(L, ast_channel_context(chan));
|
||||
lua_pushliteral(L, "context");
|
||||
} else if (strcmp(exten, chan->exten)) {
|
||||
} else if (strcmp(exten, ast_channel_exten(chan))) {
|
||||
lua_pushstring(L, exten);
|
||||
lua_pushstring(L, chan->exten);
|
||||
lua_pushstring(L, ast_channel_exten(chan));
|
||||
lua_pushliteral(L, "exten");
|
||||
} else if (priority != chan->priority) {
|
||||
lua_pushinteger(L, priority);
|
||||
|
@@ -352,7 +352,7 @@ static int realtime_exec(struct ast_channel *chan, const char *context, const ch
|
||||
if(!ast_strlen_zero(tmp))
|
||||
pbx_substitute_variables_helper(chan, tmp, appdata, sizeof(appdata) - 1);
|
||||
ast_verb(3, "Executing [%s@%s:%d] %s(\"%s\", \"%s\")\n",
|
||||
chan->exten, chan->context, chan->priority,
|
||||
ast_channel_exten(chan), ast_channel_context(chan), chan->priority,
|
||||
term_color(tmp1, app, COLOR_BRCYAN, 0, sizeof(tmp1)),
|
||||
term_color(tmp2, ast_channel_name(chan), COLOR_BRMAGENTA, 0, sizeof(tmp2)),
|
||||
term_color(tmp3, S_OR(appdata, ""), COLOR_BRMAGENTA, 0, sizeof(tmp3)));
|
||||
@@ -364,7 +364,7 @@ static int realtime_exec(struct ast_channel *chan, const char *context, const ch
|
||||
"Application: %s\r\n"
|
||||
"AppData: %s\r\n"
|
||||
"Uniqueid: %s\r\n",
|
||||
ast_channel_name(chan), chan->context, chan->exten, chan->priority, app, !ast_strlen_zero(appdata) ? appdata : "(NULL)", ast_channel_uniqueid(chan));
|
||||
ast_channel_name(chan), ast_channel_context(chan), ast_channel_exten(chan), chan->priority, app, !ast_strlen_zero(appdata) ? appdata : "(NULL)", ast_channel_uniqueid(chan));
|
||||
|
||||
res = pbx_exec(chan, a, appdata);
|
||||
} else
|
||||
|
Reference in New Issue
Block a user