diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-01 20:27:37 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-01 20:27:37 +0000 |
commit | f4d89e410ae1f1df4247b72ed19a97222113e8e7 (patch) | |
tree | 72344fb3a18484772df8f496cc1f9be6e902c64f /main/callerid.c | |
parent | f925470a1b0577798cad89472fbc14657a6a4d58 (diff) |
More 32->64 bit codec conversions.
In the process of swapping ULAW to a place in the extended codec space, we
found several unhandled cases, where a 32-bit integer was still being used to
handle a codec field. Most of these have been fixed with this commit, although
there is at least one case (codec_dahdi) which depends upon outside headers to
be altered before a conversion can be made.
(Fixes AST-278, SWP-459)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@231850 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/callerid.c')
-rw-r--r-- | main/callerid.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/main/callerid.c b/main/callerid.c index 0f2110c3f..be82e2b0d 100644 --- a/main/callerid.c +++ b/main/callerid.c @@ -71,7 +71,7 @@ float casdr1, casdi1, casdr2, casdi2; #define AST_CALLERID_UNKNOWN "<unknown>" -static inline void gen_tones(unsigned char *buf, int len, int codec, float ddr1, float ddi1, float ddr2, float ddi2, float *cr1, float *ci1, float *cr2, float *ci2) +static inline void gen_tones(unsigned char *buf, int len, format_t codec, float ddr1, float ddi1, float ddr2, float ddi2, float *cr1, float *ci1, float *cr2, float *ci2) { int x; float t; @@ -93,7 +93,7 @@ static inline void gen_tones(unsigned char *buf, int len, int codec, float ddr1, } } -static inline void gen_tone(unsigned char *buf, int len, int codec, float ddr1, float ddi1, float *cr1, float *ci1) +static inline void gen_tone(unsigned char *buf, int len, format_t codec, float ddr1, float ddi1, float *cr1, float *ci1) { int x; float t; @@ -255,7 +255,7 @@ void callerid_get_dtmf(char *cidstring, char *number, int *flags) } } -int ast_gen_cas(unsigned char *outbuf, int sendsas, int len, int codec) +int ast_gen_cas(unsigned char *outbuf, int sendsas, int len, format_t codec) { int pos = 0; int saslen = 2400; @@ -300,7 +300,7 @@ static unsigned short calc_crc(unsigned short crc, unsigned char data) return crc; } -int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, int codec) +int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, format_t codec) { int mylen = len; int olen; @@ -539,7 +539,7 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, i } -int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int len, int codec) +int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int len, format_t codec) { int mylen = len; int olen; @@ -791,7 +791,7 @@ static int callerid_genmsg(char *msg, int size, const char *number, const char * } -int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, int codec, +int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, format_t codec, const char* name, const char* number, int flags) { char msg[256]; @@ -879,7 +879,7 @@ int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, int cod return bytes; } -int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, int codec) +int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, format_t codec) { int bytes = 0; int x, sum; @@ -1036,7 +1036,7 @@ int ast_callerid_parse(char *instr, char **name, char **location) return 0; } -static int __ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int callwaiting, int codec) +static int __ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int callwaiting, format_t codec) { if (ast_strlen_zero(name)) name = NULL; @@ -1045,12 +1045,12 @@ static int __ast_callerid_generate(unsigned char *buf, const char *name, const c return callerid_generate(buf, number, name, 0, callwaiting, codec); } -int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int codec) +int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, format_t codec) { return __ast_callerid_generate(buf, name, number, 0, codec); } -int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, int codec) +int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, format_t codec) { return __ast_callerid_generate(buf, name, number, 1, codec); } |