From b47ed67c844d5def128f259b455af0d64b930380 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 25 Jul 2005 23:41:29 +0000 Subject: [PATCH] don't set the account code if one wasn't supplied (bug #4751) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6219 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_disa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/app_disa.c b/apps/app_disa.c index 3d4f866f97..b58d5a54e5 100755 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -312,7 +313,8 @@ 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_init(chan->cdr,chan); LOCAL_USER_REMOVE(u);