diff options
author | Terry Wilson <twilson@digium.com> | 2012-02-13 17:27:06 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2012-02-13 17:27:06 +0000 |
commit | 34c55e8e7c87a92181fca3e0101dc456eef2475b (patch) | |
tree | ad27fca98a7df582348e14b0aaa42f0065cdef99 /funcs | |
parent | a955a4770fcdd7874e1337e7df694bcd293e020e (diff) |
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
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_channel.c | 20 | ||||
-rw-r--r-- | funcs/func_dialplan.c | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/funcs/func_channel.c b/funcs/func_channel.c index c45a01252..a792b895b 100644 --- a/funcs/func_channel.c +++ b/funcs/func_channel.c @@ -350,17 +350,17 @@ static int func_channel_read(struct ast_channel *chan, const char *function, locked_copy_string(chan, buf, ast_channel_peeraccount(chan), len); else if (!strcasecmp(data, "hangupsource")) locked_copy_string(chan, buf, ast_channel_hangupsource(chan), len); - else if (!strcasecmp(data, "appname") && chan->appl) - locked_copy_string(chan, buf, chan->appl, len); - else if (!strcasecmp(data, "appdata") && chan->data) - locked_copy_string(chan, buf, chan->data, len); - else if (!strcasecmp(data, "exten") && chan->data) - locked_copy_string(chan, buf, chan->exten, len); - else if (!strcasecmp(data, "context") && chan->data) - locked_copy_string(chan, buf, chan->context, len); - else if (!strcasecmp(data, "userfield") && chan->data) + else if (!strcasecmp(data, "appname") && ast_channel_appl(chan)) + locked_copy_string(chan, buf, ast_channel_appl(chan), len); + else if (!strcasecmp(data, "appdata") && ast_channel_data(chan)) + locked_copy_string(chan, buf, ast_channel_data(chan), len); + else if (!strcasecmp(data, "exten") && ast_channel_data(chan)) + locked_copy_string(chan, buf, ast_channel_exten(chan), len); + else if (!strcasecmp(data, "context") && ast_channel_data(chan)) + locked_copy_string(chan, buf, ast_channel_context(chan), len); + else if (!strcasecmp(data, "userfield") && ast_channel_data(chan)) locked_copy_string(chan, buf, ast_channel_userfield(chan), len); - else if (!strcasecmp(data, "channame") && chan->data) + else if (!strcasecmp(data, "channame") && ast_channel_data(chan)) locked_copy_string(chan, buf, ast_channel_name(chan), len); else if (!strcasecmp(data, "linkedid")) { ast_channel_lock(chan); diff --git a/funcs/func_dialplan.c b/funcs/func_dialplan.c index 06ba583c1..904eede29 100644 --- a/funcs/func_dialplan.c +++ b/funcs/func_dialplan.c @@ -136,7 +136,7 @@ static int acf_isexten_exec(struct ast_channel *chan, const char *cmd, char *par AST_STANDARD_APP_ARGS(args, parse); if (ast_strlen_zero(args.context)) { - args.context = chan->context; + args.context = ast_strdupa(ast_channel_context(chan)); } if (ast_strlen_zero(args.extension)) { |