#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
\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
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;
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);
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)