]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix msvc compile. Cleanup some warnings.
authorMichael Jerris <mike@jerris.com>
Fri, 24 Feb 2006 00:02:02 +0000 (00:02 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 24 Feb 2006 00:02:02 +0000 (00:02 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@660 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_platform.h
src/include/switch_utils.h
src/mod/endpoints/mod_exosip/mod_exosip.c
src/switch_utils.c

index ce816532959f8995c43e990f82b5a4a6dc5d1290..b3513b3211f5a05029409b7a28b5d77c39154af5 100644 (file)
@@ -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
index 46fdb8fe64c841f5fbccd136e99c77040cfe65ce..4ab3585b72bd71125e8dfb7e75dd6e166ed95bda 100644 (file)
@@ -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 
index fa5045ff3048d45c2ce9cefed3d6bb01d9878828..6dbe77b9dc52b8dc46bf5b573f3c97e9f9300fd9 100644 (file)
@@ -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);
index 66f507a20ae4c06cd0124535d2b0aa421386c43b..9085309db9e06ef71fe68efd695381133a4daff6 100644 (file)
@@ -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)