[Asterisk-cvs] asterisk/apps app_disa.c,1.30,1.31

kpfleming at lists.digium.com kpfleming at lists.digium.com
Tue Jul 19 19:37:58 CDT 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv19578/apps

Modified Files:
	app_disa.c 
Log Message:
ensure account code is not overwritten when none is supplied (bug #4743)


Index: app_disa.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_disa.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- app_disa.c	15 Jul 2005 23:00:46 -0000	1.30
+++ app_disa.c	19 Jul 2005 23:45:21 -0000	1.31
@@ -329,7 +329,9 @@
 		}
 		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);




More information about the svn-commits mailing list