aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_disa.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-19 23:45:21 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-19 23:45:21 +0000
commit176a2ae83ec690394ef850d2fc08344160d19acc (patch)
treeb0210deae811aeb804ac91af6533230eb52b470a /apps/app_disa.c
parent6b05f542c35726c1a32f7838e33991c41a4b0efb (diff)
ensure account code is not overwritten when none is supplied (bug #4743)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6168 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_disa.c')
-rwxr-xr-xapps/app_disa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_disa.c b/apps/app_disa.c
index 8b934638d..9f6977629 100755
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -329,7 +329,9 @@ static int disa_exec(struct ast_channel *chan, void *data)
}
strncpy(chan->exten, exten, sizeof(chan->exten) - 1);
strncpy(chan->context, ourcontext, sizeof(chan->context) - 1);
- strncpy(chan->accountcode, acctcode, sizeof(chan->accountcode) - 1);
+ if (!ast_strlen_zero(acctcode)) {
+ strncpy(chan->accountcode, acctcode, sizeof(chan->accountcode) - 1);
+ }
chan->priority = 0;
ast_cdr_reset(chan->cdr,AST_CDR_FLAG_POSTED);
LOCAL_USER_REMOVE(u);