~damg/ubuntu/quantal/asterisk/LP1097687

« back to all changes in this revision

Viewing changes to apps/app_disa.c

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2009-09-22 16:22:14 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090922162214-awce8id0lt9v51jb
Tags: 1:1.6.2.0~rc2-0ubuntu1

* New upstream version, upstream is now DFSG compliant.
  - ilibc has been removed upstream.
  - Music on Hold is now cc-by-sa.
  - binary firmware iaxy.bin has been removed upstream.
* debian/rules: Santitised UPSTREAM variable for compatiability
  with Ubuntu and other variants.
* debian/control: Removed Debian Vcs-Svn entry and replaced 
  with ubuntu-voip Vcs-Bzr, to reflect divergence in packages.
* patches/makefile_appdocs_dtd: Removed, merged upstream.
* patches/disable_moh: Previosly disabled, removed from pool.
* patches/ubuntu-banner: Ported debian-banner to display Ubuntu
  centric bug report information.
* Refresh quilt patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include "asterisk.h"
30
30
 
31
 
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 176627 $")
 
31
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 216647 $")
32
32
 
33
33
#include <math.h>
34
34
#include <sys/time.h>
187
187
                        /* answer */
188
188
                        ast_answer(chan);
189
189
                }
190
 
        } else
 
190
        } else {
191
191
                special_noanswer = 1;
 
192
                if (chan->_state != AST_STATE_UP) {
 
193
                        ast_indicate(chan, AST_CONTROL_PROGRESS);
 
194
                }
 
195
        }
192
196
 
193
197
        ast_debug(1, "Context: %s\n",args.context);
194
198
 
250
254
                        if (!(k&1)) { /* if in password state */
251
255
                                if (j == '#') { /* end of password */
252
256
                                          /* see if this is an integer */
253
 
                                        if (sscanf(args.passcode,"%d",&j) < 1) { /* nope, it must be a filename */
 
257
                                        if (sscanf(args.passcode,"%30d",&j) < 1) { /* nope, it must be a filename */
254
258
                                                fp = fopen(args.passcode,"r");
255
259
                                                if (!fp) {
256
260
                                                        ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,chan->name);
276
280
                                                        ast_debug(1, "Mailbox: %s\n",args.mailbox);
277
281
 
278
282
                                                        /* password must be in valid format (numeric) */
279
 
                                                        if (sscanf(args.passcode,"%d", &j) < 1)
 
283
                                                        if (sscanf(args.passcode,"%30d", &j) < 1)
280
284
                                                                continue;
281
285
                                                         /* if we got it */
282
286
                                                        if (!strcmp(exten,args.passcode)) {