~ubuntu-branches/debian/squeeze/asterisk-chan-capi/squeeze

« back to all changes in this revision

Viewing changes to chan_capi_qsig_asn197ade.c

  • Committer: Bazaar Package Importer
  • Author(s): Faidon Liambotis
  • Date: 2008-04-01 08:14:08 UTC
  • mfrom: (1.1.6 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080401081408-fposuvv8f2cjkeq2
* New upstream release.
  - Removed debian/patches/asterisk_1.4.3.dpatch, merged upstream.
  - Patch upstream's Makefile to use system's libcapi instead of the shipped
    one.
* Enable "noisy build", so that gcc arguments are visible on build logs.
* Bump Standards-Version to 3.7.3, no changes.
* Switch to asterisk-1.4 dependency, hopefully depending on a frozen ABI.
* Depend on asterisk-dev >= 1:1.4, fixes lintian warning.
* Remove isdn4linux and OpenPBX references in the long description.
* Update Uploaders to reflect the truth about the maintainers
  of the package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * (CAPI*)
3
 
 *
4
2
 * An implementation of Common ISDN API 2.0 for Asterisk
5
3
 *
6
 
 * Copyright (C) 2005-2007 Cytronics & Melware
 
4
 * Copyright (C) 2005-2008 Cytronics & Melware
7
5
 * Copyright (C) 2007 Mario Goegel
8
6
 *
9
7
 * Armin Schindler <armin@melware.de>
21
19
#include <stdio.h>
22
20
#include <string.h>
23
21
                
24
 
#include <asterisk/channel.h>
25
 
#include <asterisk/options.h>
26
22
#include "chan_capi20.h"
27
23
#include "chan_capi.h"
28
24
#include "chan_capi_utils.h"
50
46
        
51
47
        numtype = (data[myidx++] & 0x0F);       /* defines type of Number: numDigits, publicPartyNum, nsapEncNum, dataNumDigits */
52
48
        
53
 
        /* cc_verbose(1, 1, VERBOSE_PREFIX_4 " * num type %i,%i\n", numtype, myidx);   */
 
49
        /* cc_qsig_verbose( 1, VERBOSE_PREFIX_4 " * num type %i,%i\n", numtype, myidx);   */
54
50
        switch (numtype){
55
51
                case 0:
56
52
                        if (data[myidx] > 0) {  /* length of this context data */
79
75
                        }
80
76
                        break;
81
77
        };
82
 
        /* cc_verbose(1, 1, VERBOSE_PREFIX_4 " * num type %i,%i\n", numtype, myidx);    */
 
78
        /* cc_qsig_verbose( 1, VERBOSE_PREFIX_4 " * num type %i,%i\n", numtype, myidx);    */
83
79
        return myidx - *idx;
84
80
}
85
81
 
97
93
        memcpy(buf, &data[myidx], strsize);
98
94
        buf[strsize] = 0;
99
95
        
100
 
        /* cc_verbose(1, 1, VERBOSE_PREFIX_4 " * string length %i,%i\n", strsize, *idx); */
 
96
        /* cc_qsig_verbose( 1, VERBOSE_PREFIX_4 " * string length %i,%i\n", strsize, *idx); */
101
97
        return strsize;
102
98
}
103
99
 
138
134
        
139
135
        numtype = (data[myidx++] & 0x0F);       /* defines type of Number */
140
136
        
141
 
        /* cc_verbose(1, 1, VERBOSE_PREFIX_4 " * num type %i,%i\n", numtype, myidx);   */
 
137
        /* cc_qsig_verbose( 1, VERBOSE_PREFIX_4 " * num type %i,%i\n", numtype, myidx);   */
142
138
        switch (numtype){
143
139
                case 0:
144
140
                        /* myidx points now to length */
145
141
                        res = cc_qsig_asn197ade_get_partynumber(buf, buflen, &myidx, data);
146
 
                        /* cc_verbose(1, 1, VERBOSE_PREFIX_4 " * res %i\n", numtype);   */
 
142
                        /* cc_qsig_verbose( 1, VERBOSE_PREFIX_4 " * res %i\n", numtype);   */
147
143
                        if (!res)
148
144
                                return 0;
149
145