diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-01 16:16:36 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-01 16:16:36 +0000 |
commit | 432dce19e4b0e2cefc532a1fbb9cef1448f58400 (patch) | |
tree | 62d9385decb3ef0e484325f37f6c9eb157db9190 /apps/app_dial.c | |
parent | f2e96029e7679e982cd3db3fae9593c83989f9fa (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_dial.c')
-rw-r--r-- | apps/app_dial.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index b7cafd091..370ac711b 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -639,7 +639,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, OPT_CALLEE_PARK | OPT_CALLER_PARK | OPT_CALLEE_MIXMONITOR | OPT_CALLER_MIXMONITOR | DIAL_NOFORWARDHTML); - ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext)); + ast_string_field_set(c, dialcontext, ""); ast_copy_string(c->exten, "", sizeof(c->exten)); } continue; @@ -677,7 +677,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, OPT_CALLEE_PARK | OPT_CALLER_PARK | OPT_CALLEE_MIXMONITOR | OPT_CALLER_MIXMONITOR | DIAL_NOFORWARDHTML); - ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext)); + ast_string_field_set(c, dialcontext, ""); ast_copy_string(c->exten, "", sizeof(c->exten)); if (CAN_EARLY_BRIDGE(peerflags)) /* Setup early bridge if appropriate */ @@ -1513,10 +1513,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags ast_app_group_set_channel(tc, outbound_group); /* Inherit context and extension */ - if (!ast_strlen_zero(chan->macrocontext)) - ast_copy_string(tc->dialcontext, chan->macrocontext, sizeof(tc->dialcontext)); - else - ast_copy_string(tc->dialcontext, chan->context, sizeof(tc->dialcontext)); + ast_string_field_set(tc, dialcontext, ast_strlen_zero(chan->macrocontext) ? chan->context : chan->macrocontext); if (!ast_strlen_zero(chan->macroexten)) ast_copy_string(tc->exten, chan->macroexten, sizeof(tc->exten)); else |