fix msvc compile. Cleanup some warnings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@660 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
01fd1c3af4
commit
dbdad46049
|
@ -113,6 +113,7 @@ typedef unsigned long in_addr_t;
|
|||
#else
|
||||
#define SWITCH_MOD_DECLARE(type) __declspec(dllimport) type __cdecl
|
||||
#endif
|
||||
#define SIGHUP SIGTERM
|
||||
#else //not win32
|
||||
#define SWITCH_DECLARE(type) type
|
||||
#define SWITCH_DECLARE_NONSTD(type) type
|
||||
|
|
|
@ -79,7 +79,7 @@ SWITCH_DECLARE(char) switch_rfc2833_to_char(int event);
|
|||
\param the charecter to encode
|
||||
\return the event id for the specified character or -1 on an invalid input
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_char_to_rfc2833(char key);
|
||||
SWITCH_DECLARE(unsigned char) switch_char_to_rfc2833(char key);
|
||||
|
||||
/*!
|
||||
\brief Duplicate a string
|
||||
|
|
|
@ -673,7 +673,7 @@ static switch_status exosip_write_frame(switch_core_session *session, switch_fra
|
|||
tech_pvt->out_digit_sofar = 0;
|
||||
tech_pvt->out_digit_dur = rdigit->duration;
|
||||
tech_pvt->out_digit = rdigit->digit;
|
||||
tech_pvt->out_digit_packet[0] = switch_char_to_rfc2833(rdigit->digit);
|
||||
tech_pvt->out_digit_packet[0] = (unsigned char)switch_char_to_rfc2833(rdigit->digit);
|
||||
tech_pvt->out_digit_packet[1] = 7;
|
||||
|
||||
ts = tech_pvt->timestamp_dtmf += samples;
|
||||
|
@ -767,7 +767,7 @@ static switch_status exosip_send_dtmf(switch_core_session *session, char *digits
|
|||
for(c = digits; *c; c++) {
|
||||
struct rfc2833_digit *rdigit;
|
||||
|
||||
if ((rdigit = malloc(sizeof(*rdigit)))) {
|
||||
if ((rdigit = malloc(sizeof(*rdigit))) != 0) {
|
||||
memset(rdigit, 0, sizeof(*rdigit));
|
||||
rdigit->digit = *c;
|
||||
rdigit->duration = globals.dtmf_duration * (tech_pvt->read_codec.implementation->samples_per_second / 1000);
|
||||
|
|
|
@ -38,16 +38,16 @@ SWITCH_DECLARE(char) switch_rfc2833_to_char(int event)
|
|||
return (event > -1 && event < sizeof(RFC2833_CHARS)) ? RFC2833_CHARS[event] : '\0';
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_char_to_rfc2833(char key)
|
||||
SWITCH_DECLARE(unsigned char) switch_char_to_rfc2833(char key)
|
||||
{
|
||||
char *c;
|
||||
|
||||
for (c = RFC2833_CHARS; *c ; c++) {
|
||||
if (*c == key) {
|
||||
return (c - RFC2833_CHARS);
|
||||
return (unsigned char)(c - RFC2833_CHARS);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return (unsigned char)-1;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char **array, int arraylen)
|
||||
|
|
Loading…
Reference in New Issue