mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 04:43:50 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@231850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user