aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-01 16:16:36 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-01 16:16:36 +0000
commit432dce19e4b0e2cefc532a1fbb9cef1448f58400 (patch)
tree62d9385decb3ef0e484325f37f6c9eb157db9190 /apps/app_queue.c
parentf2e96029e7679e982cd3db3fae9593c83989f9fa (diff)
another minor ast_channel memory size decrease... for nearly all channels, 'dialcontext' is only going to be set once during the channel's lifetime, so make it a string field instead of a char array
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126960 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index da58c105d..872dc4955 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2205,10 +2205,7 @@ static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies
/* Inherit context and extension */
ast_channel_lock(qe->chan);
macrocontext = pbx_builtin_getvar_helper(qe->chan, "MACRO_CONTEXT");
- if (!ast_strlen_zero(macrocontext))
- ast_copy_string(tmp->chan->dialcontext, macrocontext, sizeof(tmp->chan->dialcontext));
- else
- ast_copy_string(tmp->chan->dialcontext, qe->chan->context, sizeof(tmp->chan->dialcontext));
+ ast_string_field_set(tmp->chan, dialcontext, ast_strlen_zero(macrocontext) ? qe->chan->context : macrocontext);
macroexten = pbx_builtin_getvar_helper(qe->chan, "MACRO_EXTEN");
if (!ast_strlen_zero(macroexten))
ast_copy_string(tmp->chan->exten, macroexten, sizeof(tmp->chan->exten));