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);

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to