aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_local.c
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-31 10:13:22 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-31 10:13:22 +0000
commitfd244115bbd842332520b177d20de384f5350ad9 (patch)
tree9f57e3c032f93b5153cc9bfb665cc5ac42d9d736 /channels/chan_local.c
parent8110a17780a0f082b5f16c86e4ba8760063c9b28 (diff)
minor cleanup: localize a variable and replace i++; i++ with i +=2;
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16652 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r--channels/chan_local.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 679161678..c0b571e45 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -382,12 +382,11 @@ static int local_hangup(struct ast_channel *ast)
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP };
struct ast_channel *ochan = NULL;
int glaredetect;
- const char *status;
ast_mutex_lock(&p->lock);
isoutbound = IS_OUTBOUND(ast, p);
if (isoutbound) {
- status = pbx_builtin_getvar_helper(p->chan, "DIALSTATUS");
+ const char *status = pbx_builtin_getvar_helper(p->chan, "DIALSTATUS");
if ((status) && (p->owner))
pbx_builtin_setvar_helper(p->owner, "CHANLOCALSTATUS", status);
p->chan = NULL;
@@ -512,8 +511,7 @@ static struct ast_channel *local_new(struct local_pvt *p, int state)
p->owner = tmp;
p->chan = tmp2;
ast_mutex_lock(&usecnt_lock);
- usecnt++;
- usecnt++;
+ usecnt += 2; /* we allocate 2 new channels */
ast_mutex_unlock(&usecnt_lock);
ast_update_use_count();
ast_copy_string(tmp->context, p->context, sizeof(tmp->context));