diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-25 23:41:29 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-25 23:41:29 +0000 |
commit | ce99856e2903b1714db873451db8345a4c999da3 (patch) | |
tree | a883050a3da42002cc0de001ea232f053d4927e1 /apps | |
parent | ad8434e10f7e51ecd3a2e30c1ced2e238edde901 (diff) |
don't set the account code if one wasn't supplied (bug #4751)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@6219 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_disa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_disa.c b/apps/app_disa.c index 3d4f866f9..b58d5a54e 100755 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -22,6 +22,7 @@ #include <asterisk/module.h> #include <asterisk/translate.h> #include <asterisk/ulaw.h> +#include <asterisk/utils.h> #include <string.h> #include <stdlib.h> #include <stdio.h> @@ -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); |