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

Modified Files:
      Tag: v1-0
        app_disa.c 
Log Message:
don't set the account code if one wasn't supplied (bug #4751)


Index: app_disa.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_disa.c,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.2
diff -u -d -r1.17.2.1 -r1.17.2.2
--- app_disa.c  5 Apr 2005 09:31:11 -0000       1.17.2.1
+++ app_disa.c  25 Jul 2005 23:41:29 -0000      1.17.2.2
@@ -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 @@
                }
                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);

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

Reply via email to