]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix warnings on windows x64 builds src and mods projects - only libsofia included...
authorJeff Lenk <jeff@jefflenk.com>
Wed, 29 Sep 2010 20:47:58 +0000 (15:47 -0500)
committerJeff Lenk <jeff@jefflenk.com>
Wed, 29 Sep 2010 20:47:58 +0000 (15:47 -0500)
30 files changed:
libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http.h
libs/sofia-sip/libsofia-sip-ua/msg/msg_tag.c
libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_header.h
libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime.h
libs/sofia-sip/libsofia-sip-ua/nea/nea_server.c
libs/sofia-sip/libsofia-sip-ua/nta/nta.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h
libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip.h
libs/sofia-sip/libsofia-sip-ua/soa/soa.c
libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c
libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
libs/sofia-sip/libsofia-sip-ua/su/su.c
libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h
src/include/switch_types.h
src/mod/applications/mod_commands/mod_commands.c
src/mod/applications/mod_conference/mod_conference.c
src/mod/applications/mod_directory/mod_directory.c
src/mod/applications/mod_fifo/mod_fifo.c
src/mod/applications/mod_hash/mod_hash.c
src/mod/applications/mod_lcr/mod_lcr.c
src/mod/applications/mod_nibblebill/mod_nibblebill.c
src/mod/applications/mod_spandsp/udptl.c
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sip-dig.c
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_reg.c
src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx
src/mod/languages/mod_managed/managed/swig.2010.cs

index d5bb617914ecefddd5e3ec461a730dc2eba75ad9..bd42743c9f2954bd6c39ba26e3d9bf14257c377b 100644 (file)
@@ -58,7 +58,11 @@ SOFIA_BEGIN_DECLS
 #define HTTP_DEFAULT_SERV "80"
 
 /** HTTP protocol identifier */
+#ifndef _MSC_VER
 #define HTTP_PROTOCOL_TAG   ((void *)0x48545450)       /* 'HTTP' */
+#else
+#define HTTP_PROTOCOL_TAG   ((void *)(UINT_PTR)0x48545450)     /* 'HTTP' */
+#endif
 
 /** HTTP parser flags */
 enum {
index 2be30b04b97a8239810b10e7146baad2d9268bb8..8d1b1d52858a7be3c177fe8b02123bff79a767f7 100644 (file)
 #include <sofia-sip/su_tagarg.h>
 #include "sofia-sip/msg_tag_class.h"
 
+#ifndef _MSC_VER
 #define NONE ((void*)-1)
+#else
+#define NONE ((void*)(UINT_PTR)-1)
+#endif
 
 int msghdrtag_snprintf(tagi_t const *t, char b[], size_t size)
 {
index 91fd72316bfb2e0793f7ba8003792963b402daa3..f930b178e72a1eed818cc27b8319d3a616fe1862 100644 (file)
@@ -299,7 +299,12 @@ enum {
    (h))
 
 /** No header. */
+
+#ifndef _MSC_VER
 #define MSG_HEADER_NONE ((msg_header_t *)-1)
+#else
+#define MSG_HEADER_NONE ((msg_header_t *)(UINT_PTR)-1)
+#endif
 
 SOFIA_END_DECLS
 
index 4a9f234dec89ec3d9edc46ced8ee46537b72dd2b..033c551fdb833c7cb14380581c6c86a0197fc498 100644 (file)
@@ -235,7 +235,11 @@ msg_content_length_t *msg_content_length_create(su_home_t *home, uint32_t n);
 SOFIAPUBVAR char const msg_mime_version_1_0[];
 
 /** MIME multipart parser table identifier. @HIDE */
+#ifndef _MSC_VER
 #define MSG_MULTIPART_PROTOCOL_TAG   ((void *)0x4d494d45)      /* 'MIME' */
+#else
+#define MSG_MULTIPART_PROTOCOL_TAG   ((void *)(UINT_PTR)0x4d494d45)    /* 'MIME' */
+#endif
 
 SOFIA_END_DECLS
 
index 4287ae4359577f64b2d77a5bfdcd5aa0558d3829..2e5c482e73a5ad9a94a15e3185ae2e811385536e 100644 (file)
 
 #include "nea_debug.h"
 
+#ifndef _MSC_VER
 #define NONE ((void *)- 1)
+#else
+#define NONE ((void *)(UINT_PTR)- 1)
+#endif
 
 #define SU_ROOT_MAGIC_T      struct nea_server_s
 #define SU_MSG_ARG_T         tagi_t
index 656aecc195993a98b72fe0b6c355fdd3c77d601a..d360041537f4fcf5bdf6d622b443046170ec8135 100644 (file)
@@ -104,8 +104,11 @@ char const nta_version[] = PACKAGE_VERSION;
 static char const __func__[] = "nta";
 #endif
 
+#ifndef _MSC_VER
 #define NONE ((void *)-1)
-
+#else
+#define NONE ((void *)(UINT_PTR)-1)
+#endif
 /* ------------------------------------------------------------------------- */
 
 /** Resolving order */
index bf35263d9271861cd5e4f23ad876647fc178acca..cc4bcb2bef0877d80a419dff11f0b4395e1cd194 100644 (file)
 #include <sofia-sip/su_debug.h>
 
 #ifndef NONE
+
+#ifndef _MSC_VER
 #define NONE ((void *)-1)
+#else
+#define NONE ((void *)(UINT_PTR)-1)
+#endif
 #endif
 
 /* ======================================================================== */
index 318ccdd61dda3cee75ab25c929683cc214f017b0..f39f9d4c1a16853f28cb10e55270ba0967d1cbe4 100644 (file)
@@ -83,7 +83,11 @@ typedef struct nua_ee_data {
   nua_event_data_t ee_data[1];
 } nua_ee_data_t;
 
+#ifndef _MSC_VER
 #define       NONE ((void *)-1)
+#else
+#define       NONE ((void *)(UINT_PTR)-1)
+#endif
 
 typedef struct register_usage nua_registration_t;
 
index 1a235ca4c88ca464a9bcad38b226aa810c9b8081..3c38f3b4fb26c41da43efb05b360b2548cbd8049 100644 (file)
@@ -81,10 +81,18 @@ typedef enum {
 #define SIP_METHOD_PUBLISH    sip_method_publish, "PUBLISH"
 
 /** Magic pointer value - never valid for SIP headers. @HI */
+#ifndef _MSC_VER
 #define SIP_NONE ((void const *)-1L)
+#else
+#define SIP_NONE ((void const *)(UINT_PTR)-1L)
+#endif
 
 /** SIP protocol identifier @HIDE */
+#ifndef _MSC_VER
 #define SIP_PROTOCOL_TAG   ((void *)0x53495020)        /* 'SIP'20 */
+#else
+#define SIP_PROTOCOL_TAG   ((void *)(UINT_PTR)0x53495020)      /* 'SIP'20 */
+#endif
 
 enum {
   /** Default port for SIP as integer */
index de79e0f3a5bb7b34f2b82fe94fa2d4f8277c71f1..d1b7477fc00c4b370ce063231b18f27dcfc080aa 100644 (file)
 #include <sofia-sip/su_string.h>
 #include <sofia-sip/su_errno.h>
 
+#ifndef _MSC_VER
 #define NONE ((void *)-1)
+#else
+#define NONE ((void *)(UINT_PTR)-1)
+#endif
 #define XXX assert(!"implemented")
 
 typedef unsigned longlong ull;
index f94f9b29624f57e8bd6ceb763a54b45fe90de0cd..2c870b28ad1f3ce01bdf9bc3f44a74c5ea3e7669 100644 (file)
@@ -396,7 +396,11 @@ sdp_rtpmap_t *soa_sdp_media_matching_rtpmap(sdp_rtpmap_t const *from,
   return NULL;
 }
 
+#ifndef _MSC_VER
 #define SDP_MEDIA_NONE ((sdp_media_t *)-1)
+#else
+#define SDP_MEDIA_NONE ((sdp_media_t *)(UINT_PTR)-1)
+#endif
 
 /** Find first matching media in table @a mm.
  *
index f660b2ce226d2aafb3650c3a6fcfe3dcc69258ee..e494571f54f7ac3b30cd6c5dfd2de1e81de6159a 100644 (file)
@@ -125,7 +125,7 @@ su_inline
 ssize_t sres_recvfrom(sres_socket_t s, void *buffer, size_t length, int flags,
                      struct sockaddr *from, socklen_t *fromlen)
 {
-  int retval, ilen;
+  int retval, ilen = 0;
 
   if (fromlen)
     ilen = *fromlen;
index 250b5d62d1ea064159511ea65bbc4c5c9381e18e..8067fdec609b1f21d3df706f12b014d1658410e9 100644 (file)
@@ -434,7 +434,7 @@ ssize_t su_recv(su_socket_t s, void *buffer, size_t length, int flags)
 ssize_t su_recvfrom(su_socket_t s, void *buffer, size_t length, int flags,
                    su_sockaddr_t *from, socklen_t *fromlen)
 {
-  int retval, ilen;
+  int retval, ilen = 0;
 
   if (fromlen)
     ilen = *fromlen;
index b56dd2d9bc7758d13e2c6da6dddeae615ca0f2ee..a26d38a552338e645339bd09370db5f4f9dbca8e 100644 (file)
 #endif
 
 #ifndef NONE
+#ifndef _MSC_VER
 #define NONE ((void *)-1)
+#else
+#define NONE ((void *)(UINT_PTR)-1)
+#endif
 #endif
 
 SOFIA_BEGIN_DECLS
index b0395bafdcd48526e3ce48e31f46d38f349c993d..70eaa4f80e451f6d984f281dac5329dc2d2473f4 100644 (file)
@@ -770,9 +770,9 @@ typedef struct {
        const char *T38FaxUdpEC;
        const char *T38VendorInfo;
        const char *remote_ip;
-       uint32_t remote_port;
+       uint16_t remote_port;
        const char *local_ip;
-       uint32_t local_port;
+       uint16_t local_port;
 } switch_t38_options_t;
 
 /*!
index 6a16a9c7e5c83c986db41a61869bb8f6d173c098..1fb1c95c47fed32e8a376d8ffb6222639615fab7 100644 (file)
@@ -1065,7 +1065,7 @@ SWITCH_STANDARD_API(url_encode_function)
        int len = 0;
 
        if (!zstr(cmd)) {
-               len = (strlen(cmd) * 3) + 1;
+               len = (int)(strlen(cmd) * 3) + 1;
                switch_zmalloc(data, len);
                switch_url_encode(cmd, data, len);
                reply = data;
@@ -4218,7 +4218,7 @@ SWITCH_STANDARD_API(escape_function)
                return SWITCH_STATUS_SUCCESS;
        }
 
-       len = strlen(cmd) * 2;
+       len = (int)strlen(cmd) * 2;
        mycmd = malloc(len);
 
        stream->write_function(stream, "%s", switch_escape_string(cmd, mycmd, len));
index 1bc220134d33dff2a1267fbbf89224d739a11921..701829454699905c3dc27f647f6342a0ef9b8c04 100644 (file)
@@ -1012,7 +1012,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
        uint8_t *file_frame;
        uint8_t *async_file_frame;
        int16_t *bptr;
-       int x = 0;
+       uint32_t x = 0;
        int32_t z = 0;
        int member_score_sum = 0;
        int divisor = 0;
index 8464b1c0df18e475a94c4022eecca9faf22dbb84..d92974766d5fe9f57c3f30a7ad73f5d5d7ad718e 100644 (file)
@@ -393,7 +393,7 @@ static dir_profile_t *load_profile(const char *profile_name)
                profile_set_config(profile);
 
                /* Add the params to the event structure */
-               count = switch_event_import_xml(switch_xml_child(x_profile, "param"), "name", "value", &event);
+               count = (int)switch_event_import_xml(switch_xml_child(x_profile, "param"), "name", "value", &event);
 
                if (switch_xml_config_parse_event(event, count, SWITCH_FALSE, profile->config) != SWITCH_STATUS_SUCCESS) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to process configuration\n");
@@ -611,7 +611,7 @@ static switch_status_t on_dtmf(switch_core_session_t *session, void *input, swit
                        }
 
                        if (strlen(cbr->digits) < sizeof(cbr->digits) - 2) {
-                               int at = strlen(cbr->digits);
+                               int at = (int)strlen(cbr->digits);
                                cbr->digits[at++] = dtmf->digit;
                                cbr->digits[at] = '\0';
                        } else {
index 585e4bfab4afac874c1d2ff4ab6164a9a2a31a12..563706c9f206499595227be61b1b81c37b4b5176 100644 (file)
@@ -513,7 +513,6 @@ static switch_status_t caller_read_frame_callback(switch_core_session_t *session
                        if (match_key(caller_exit_key, *buf)) {
                                cd->abort = 1;
                                return SWITCH_STATUS_FALSE;
-                               switch_channel_set_variable(channel, "fifo_caller_exit_key", (char *)buf);
                        }
                        cd->next = switch_epoch_time_now(NULL) + cd->freq;
                        cd->index++;
index 3a65528ea3c56d322ade82bf0fe2eee14cf916ec..29a056104ffc052b2cf8cd9a52788bd744f1f9e2 100644 (file)
@@ -852,7 +852,8 @@ static void do_config(switch_bool_t reload)
                                const char *username = switch_xml_attr(x_list, "username");
                                const char *password = switch_xml_attr(x_list, "password");
                                const char *szinterval = switch_xml_attr(x_list, "interval");
-                               int port = 0,  interval = 0;
+                               uint16_t port = 0;
+                               int     interval = 0;
                                limit_remote_t *remote;
                                switch_threadattr_t *thd_attr = NULL;
                                
@@ -866,7 +867,7 @@ static void do_config(switch_bool_t reload)
                                }
 
                                if (!zstr(szport)) {
-                                       port = atoi(szport);
+                                       port = (uint16_t)atoi(szport);
                                }
                                
                                if (!zstr(szinterval)) {
@@ -949,7 +950,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_hash_shutdown)
        /* Kill remote connections, destroy needs a wrlock so we unlock after finding a pointer */
        while(remote_clean) {
                void *val;      
-               const void *key;
+               const void *key = NULL;
                switch_ssize_t keylen;
                limit_remote_t *item = NULL;
                
index 105576ce140b807995e17d659bfad987f8a3e5f1..cc937073674471f978eedbe7cd1d7c0fdd90f8c6 100644 (file)
@@ -167,7 +167,7 @@ static const char *do_cid(switch_memory_pool_t *pool, const char *cid, const cha
        switch_channel_t *channel = NULL;
        
        if (!zstr(cid)) {
-               len = strlen(cid);
+               len = (uint32_t)strlen(cid);
        } else {
                goto done;
        }
@@ -506,7 +506,7 @@ static char *expand_digits(switch_memory_pool_t *pool, char *digits, switch_bool
        int digit_len;
        SWITCH_STANDARD_STREAM(dig_stream);
 
-       digit_len = strlen(digits);
+       digit_len = (int)strlen(digits);
        digits_copy = switch_core_strdup(pool, digits);
        
        for (n = digit_len; n > 0; n--) {
index 06bc7d0abde6102ad151ef98e6e4e2c26838a283..42369f5d0b991315ae823bab87c08c482bbe64d1 100755 (executable)
@@ -419,10 +419,10 @@ static switch_status_t do_billing(switch_core_session_t *session)
        billaccount = switch_channel_get_variable(channel, "nibble_account");
        
        if (!zstr(switch_channel_get_variable(channel, "nobal_amt"))) {
-               nobal_amt = atof(switch_channel_get_variable(channel, "nobal_amt"));
+               nobal_amt = (float)atof(switch_channel_get_variable(channel, "nobal_amt"));
        }
        if (!zstr(switch_channel_get_variable(channel, "lowbal_amt"))) {
-               lowbal_amt = atof(switch_channel_get_variable(channel, "lowbal_amt"));
+               lowbal_amt = (float)atof(switch_channel_get_variable(channel, "lowbal_amt"));
        }
 
        /* Return if there's no billing information on this session */
index a2651513f06a5910a2dc4327e800c45e0d03308b..f5b3be2445076ed0ae94ce1d2e110a42392b7cbb 100644 (file)
@@ -93,7 +93,7 @@ static int encode_length(uint8_t *buf, int *len, int value)
 
        if (value < 0x80) {
                /* 1 octet */
-               buf[(*len)++] = value;
+               buf[(*len)++] = (uint8_t)value;
                return value;
        }
        if (value < 0x4000) {
@@ -106,7 +106,7 @@ static int encode_length(uint8_t *buf, int *len, int value)
        /* Fragmentation */
        multiplier = (value < 0x10000) ? (value >> 14) : 4;
        /* Set the first 2 bits of the octet */
-       buf[(*len)++] = 0xC0 | multiplier;
+       buf[(*len)++] = (uint8_t) (0xC0 | multiplier);
        return multiplier << 14;
 }
 
@@ -419,10 +419,10 @@ int udptl_build_packet(udptl_state_t *s, uint8_t buf[], const uint8_t msg[], int
                /* Span is defined as an inconstrained integer, which it dumb. It will only
                   ever be a small value. Treat it as such. */
                buf[len++] = 1;
-               buf[len++] = span;
+               buf[len++] = (uint8_t)span;
                /* The number of entries is defined as a length, but will only ever be a small
                   value. Treat it as such. */
-               buf[len++] = entries;
+               buf[len++] = (uint8_t)entries;
                for (m = 0; m < entries; m++) {
                        /* Make an XOR'ed entry the maximum length */
                        limit = (entry + m) & UDPTL_BUF_MASK;
index c2fece8a206e67ff453e046ac86c6099becc0a46..7e92decfb1d224fac46d2a42988031081d71e3b7 100644 (file)
@@ -2331,7 +2331,7 @@ static int show_reg_callback(void *pArg, int argc, char **argv, char **columnNam
                switch_time_t etime = atoi(argv[6]);
                switch_size_t retsize;
 
-               exp_secs = etime - now;
+               exp_secs = (int)(etime - now);
                switch_time_exp_lt(&tm, switch_time_from_sec(etime));
                switch_strftime_nocheck(exp_buf, &retsize, sizeof(exp_buf), "%Y-%m-%d %T", &tm);
        }
@@ -2371,7 +2371,7 @@ static int show_reg_callback_xml(void *pArg, int argc, char **argv, char **colum
                switch_time_t etime = atoi(argv[6]);
                switch_size_t retsize;
 
-               exp_secs = etime - now;
+               exp_secs = (int)(etime - now);
                switch_time_exp_lt(&tm, switch_time_from_sec(etime));
                switch_strftime_nocheck(exp_buf, &retsize, sizeof(exp_buf), "%Y-%m-%d %T", &tm);
        }
@@ -2499,7 +2499,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
                } else if (!strcasecmp(argv[0], "profile")) {
                        struct cb_helper cb;
                        char *sql = NULL;
-                       int x = 0;
+                       uint32_t x = 0;
 
                        cb.row_process = 0;
 
@@ -2779,7 +2779,7 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
                } else if (!strcasecmp(argv[0], "profile")) {
                        struct cb_helper cb;
                        char *sql = NULL;
-                       int x = 0;
+                       uint32_t x = 0;
 
                        cb.row_process = 0;
 
@@ -4394,7 +4394,8 @@ static void general_event_handler(switch_event_t *event)
                                switch_mutex_lock(mod_sofia_globals.hash_mutex);
                                if (mod_sofia_globals.profile_hash) {
                                        for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
-                                               int rb = 0, x = 0;
+                                               int rb = 0;
+                                               uint32_t x = 0;
                                                switch_hash_this(hi, &var, NULL, &val);
                                                if ((profile = (sofia_profile_t *) val) && profile->auto_restart) {
                                                        if (!strcmp(profile->sipip, old_ip4)) {
index f4714bccdaff236706917ec89ae8eb69047e430c..d0c9aa6aff320140573c6d63e4a317ba3ca69246 100644 (file)
@@ -785,7 +785,7 @@ int dig_addr(struct dig *dig,
        char const *tport2 = NULL;
        sres_record_t **answers1 = NULL, **answers2 = NULL;
        unsigned count1 = 0, count2 = 0, tcount = 0;
-       int type1 = 0, type2 = 0, family1 = 0, family2 = 0;
+       uint16_t type1 = 0, type2 = 0, family1 = 0, family2 = 0;
 
        if (dig->ip6 > dig->ip4) {
                type1 = sres_type_aaaa, family1 = AF_INET6;
index a3554ec861ff1933118d4fcb0a9dccb48f9fab44..c3248d1a3d816618823314c561be601003e5a79e 100644 (file)
@@ -1268,7 +1268,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_worker_thread_run(switch_thread_t *thread
                                        iterations++;
 
                                        if (len + newlen + 10 > sql_len) {
-                                               int new_mlen = len + newlen + 10 + 10240;
+                                               switch_size_t new_mlen = len + newlen + 10 + 10240;
                                                
                                                if (new_mlen < SQLLEN) {
                                                        sql_len = new_mlen;
index 9301348eb5d2dab1ab375603630118eca1a971e5..3dc90b9a68796a401b4bf2442843629b4269993e 100644 (file)
@@ -1280,7 +1280,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt)
                                switch_port_t remote_rtcp_port = 0;
 
                                if ((rport = switch_channel_get_variable(tech_pvt->channel, "sip_remote_video_rtcp_port"))) {
-                                       remote_rtcp_port = atoi(rport);
+                                       remote_rtcp_port = (switch_port_t)atoi(rport);
                                }
 
 
@@ -1316,7 +1316,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt)
                }
 
                if ((rport = switch_channel_get_variable(tech_pvt->channel, "sip_remote_audio_rtcp_port"))) {
-                       remote_rtcp_port = atoi(rport);
+                       remote_rtcp_port = (switch_port_t)atoi(rport);
                }
 
 
@@ -2856,7 +2856,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
                sofia_clear_flag_locked(tech_pvt, TFLAG_REINVITE);
 
                if ((rport = switch_channel_get_variable(tech_pvt->channel, "sip_remote_audio_rtcp_port"))) {
-                       remote_rtcp_port = atoi(rport);
+                       remote_rtcp_port = (switch_port_t)atoi(rport);
                }
 
                if (switch_rtp_set_remote_address(tech_pvt->rtp_session, tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port,
@@ -2991,7 +2991,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
                        const char *rport = switch_channel_get_variable(tech_pvt->channel, "sip_remote_audio_rtcp_port");
                        switch_port_t remote_port = 0;
                        if (rport) {
-                               remote_port = atoi(rport);
+                               remote_port = (switch_port_t)atoi(rport);
                        }
                        if (!strcasecmp(val, "passthru")) {
                                switch_rtp_activate_rtcp(tech_pvt->rtp_session, -1, remote_port);
@@ -3131,7 +3131,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
                                sofia_clear_flag_locked(tech_pvt, TFLAG_REINVITE);
 
                                if ((rport = switch_channel_get_variable(tech_pvt->channel, "sip_remote_video_rtcp_port"))) {
-                                       remote_rtcp_port = atoi(rport);
+                                       remote_rtcp_port = (switch_port_t)atoi(rport);
                                }
 
                                if (switch_rtp_set_remote_address
@@ -3248,7 +3248,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
                                        const char *rport = switch_channel_get_variable(tech_pvt->channel, "sip_remote_video_rtcp_port");
                                        switch_port_t remote_port = 0;
                                        if (rport) {
-                                               remote_port = atoi(rport);
+                                               remote_port = (switch_port_t)atoi(rport);
                                        }
                                        if (!strcasecmp(val, "passthru")) {
                                                switch_rtp_activate_rtcp(tech_pvt->rtp_session, -1, remote_port);
@@ -3590,7 +3590,7 @@ static switch_t38_options_t *tech_process_udptl(private_object_t *tech_pvt, sdp_
                t38_options = switch_core_session_alloc(tech_pvt->session, sizeof(switch_t38_options_t));
        }
 
-       t38_options->remote_port = m->m_port;
+       t38_options->remote_port = (switch_port_t)m->m_port;
 
        if (m->m_connections && m->m_connections->c_address) {
                t38_options->remote_ip = switch_core_session_strdup(tech_pvt->session, m->m_connections->c_address);
@@ -4848,13 +4848,13 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
                        }
 
                        if ((tmp = switch_channel_get_variable(channel, "sip_use_pt"))) {
-                               tech_pvt->pt = tech_pvt->agreed_pt = atoi(tmp);
+                               tech_pvt->pt = tech_pvt->agreed_pt = (switch_payload_t)atoi(tmp);
                        }
 
                        sofia_glue_tech_set_codec(tech_pvt, 1);
 
                        tech_pvt->adv_sdp_audio_ip = tech_pvt->extrtpip = (char *) ip;
-                       tech_pvt->adv_sdp_audio_port = tech_pvt->local_sdp_audio_port = atoi(port);
+                       tech_pvt->adv_sdp_audio_port = tech_pvt->local_sdp_audio_port = (switch_port_t)atoi(port);
 
                        if ((tmp = switch_channel_get_variable(channel, "local_media_ip"))) {
                                tech_pvt->local_sdp_audio_ip = switch_core_session_strdup(session, tmp);
@@ -4863,12 +4863,12 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
 
                        if (r_ip && r_port) {
                                tech_pvt->remote_sdp_audio_ip = (char *) r_ip;
-                               tech_pvt->remote_sdp_audio_port = atoi(r_port);
+                               tech_pvt->remote_sdp_audio_port = (switch_port_t)atoi(r_port);
                        }
 
                        if (switch_channel_test_flag(channel, CF_VIDEO)) {
                                if ((tmp = switch_channel_get_variable(channel, "sip_use_video_pt"))) {
-                                       tech_pvt->video_pt = tech_pvt->video_agreed_pt = atoi(tmp);
+                                       tech_pvt->video_pt = tech_pvt->video_agreed_pt = (switch_payload_t)atoi(tmp);
                                }
 
 
@@ -4890,11 +4890,11 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
                                        tech_pvt->video_codec_ms = atoi(tmp);
                                }
 
-                               tech_pvt->adv_sdp_video_port = tech_pvt->local_sdp_video_port = atoi(port);
+                               tech_pvt->adv_sdp_video_port = tech_pvt->local_sdp_video_port = (switch_port_t)atoi(port);
 
                                if (r_ip && r_port) {
                                        tech_pvt->remote_sdp_video_ip = (char *) r_ip;
-                                       tech_pvt->remote_sdp_video_port = atoi(r_port);
+                                       tech_pvt->remote_sdp_video_port = (switch_port_t)atoi(r_port);
                                }
                                //sofia_glue_tech_set_video_codec(tech_pvt, 1);
                        }
index 64176ee261752ad09faaf63cf3a746947a06bdb3..4f35ac0e3c736369154981374f70dcb763652c54 100644 (file)
@@ -934,7 +934,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
 
                if (sip->sip_path) {
                        path_val = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_path);
-                       path_encoded_len = (strlen(path_val) * 3) + 1;
+                       path_encoded_len = (int)(strlen(path_val) * 3) + 1;
                        switch_zmalloc(path_encoded, path_encoded_len);
                        switch_copy_string(path_encoded, ";fs_path=", 10);
                        switch_url_encode(path_val, path_encoded + 9, path_encoded_len - 9);
@@ -947,7 +947,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                                switch_snprintf(my_contact_str, sizeof(my_contact_str), "sip:%s@%s:%d", contact->m_url->url_user, url_ip, network_port);
                        }
 
-                       path_encoded_len = (strlen(my_contact_str) * 3) + 1;
+                       path_encoded_len = (int)(strlen(my_contact_str) * 3) + 1;
 
                        switch_zmalloc(path_encoded, path_encoded_len);
                        switch_copy_string(path_encoded, ";fs_path=", 10);
@@ -2126,7 +2126,8 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile,
 
        if (auth_acl) {
                if (!switch_check_network_list_ip(ip, auth_acl)) {
-                       int network_ip_is_proxy = 0, x = 0;
+                       int network_ip_is_proxy = 0;
+                       uint32_t x = 0;
                        char *last_acl = NULL;
                        if (profile->proxy_acl_count == 0) {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "IP %s Rejected by user acl [%s] and no proxy acl present\n", ip, auth_acl);
@@ -2223,7 +2224,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile,
        if (max_registrations_perext > 0 && (sip && sip->sip_contact && (sip->sip_contact->m_expires == NULL || atol(sip->sip_contact->m_expires) > 0))) {
                /* if expires is null still process */
                /* expires == 0 means the phone is going to unregiser, so don't count against max */
-               int count = 0;
+               uint32_t count = 0;
 
                call_id = sip->sip_call_id->i_id;
                switch_assert(call_id);
index b1a19f58fed96584c138ad29bbf38019e9adf909..a922aadf345298d9fb2c117cdc21f6befbc84747 100644 (file)
@@ -3583,24 +3583,24 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_t38_options_t_remote_ip_get(void * j
 }\r
 \r
 \r
-SWIGEXPORT void SWIGSTDCALL CSharp_switch_t38_options_t_remote_port_set(void * jarg1, unsigned long jarg2) {\r
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_t38_options_t_remote_port_set(void * jarg1, unsigned short jarg2) {\r
   switch_t38_options_t *arg1 = (switch_t38_options_t *) 0 ;\r
-  uint32_t arg2 ;\r
+  uint16_t arg2 ;\r
   \r
   arg1 = (switch_t38_options_t *)jarg1; \r
-  arg2 = (uint32_t)jarg2; \r
+  arg2 = (uint16_t)jarg2; \r
   if (arg1) (arg1)->remote_port = arg2;\r
 }\r
 \r
 \r
-SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_t38_options_t_remote_port_get(void * jarg1) {\r
-  unsigned long jresult ;\r
+SWIGEXPORT unsigned short SWIGSTDCALL CSharp_switch_t38_options_t_remote_port_get(void * jarg1) {\r
+  unsigned short jresult ;\r
   switch_t38_options_t *arg1 = (switch_t38_options_t *) 0 ;\r
-  uint32_t result;\r
+  uint16_t result;\r
   \r
   arg1 = (switch_t38_options_t *)jarg1; \r
-  result = (uint32_t) ((arg1)->remote_port);\r
-  jresult = (unsigned long)result; \r
+  result = (uint16_t) ((arg1)->remote_port);\r
+  jresult = result; \r
   return jresult;\r
 }\r
 \r
@@ -3634,24 +3634,24 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_t38_options_t_local_ip_get(void * ja
 }\r
 \r
 \r
-SWIGEXPORT void SWIGSTDCALL CSharp_switch_t38_options_t_local_port_set(void * jarg1, unsigned long jarg2) {\r
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_t38_options_t_local_port_set(void * jarg1, unsigned short jarg2) {\r
   switch_t38_options_t *arg1 = (switch_t38_options_t *) 0 ;\r
-  uint32_t arg2 ;\r
+  uint16_t arg2 ;\r
   \r
   arg1 = (switch_t38_options_t *)jarg1; \r
-  arg2 = (uint32_t)jarg2; \r
+  arg2 = (uint16_t)jarg2; \r
   if (arg1) (arg1)->local_port = arg2;\r
 }\r
 \r
 \r
-SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_t38_options_t_local_port_get(void * jarg1) {\r
-  unsigned long jresult ;\r
+SWIGEXPORT unsigned short SWIGSTDCALL CSharp_switch_t38_options_t_local_port_get(void * jarg1) {\r
+  unsigned short jresult ;\r
   switch_t38_options_t *arg1 = (switch_t38_options_t *) 0 ;\r
-  uint32_t result;\r
+  uint16_t result;\r
   \r
   arg1 = (switch_t38_options_t *)jarg1; \r
-  result = (uint32_t) ((arg1)->local_port);\r
-  jresult = (unsigned long)result; \r
+  result = (uint16_t) ((arg1)->local_port);\r
+  jresult = result; \r
   return jresult;\r
 }\r
 \r
index 29fa0d9eb122854ef2e4daae335161d5adf1b62c..8ef49236f908961cf4bf3220750abbad64c6f337 100644 (file)
@@ -6376,10 +6376,10 @@ class freeswitchPINVOKE {
   public static extern string switch_t38_options_t_remote_ip_get(HandleRef jarg1);\r
 \r
   [DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_remote_port_set")]\r
-  public static extern void switch_t38_options_t_remote_port_set(HandleRef jarg1, uint jarg2);\r
+  public static extern void switch_t38_options_t_remote_port_set(HandleRef jarg1, ushort jarg2);\r
 \r
   [DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_remote_port_get")]\r
-  public static extern uint switch_t38_options_t_remote_port_get(HandleRef jarg1);\r
+  public static extern ushort switch_t38_options_t_remote_port_get(HandleRef jarg1);\r
 \r
   [DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_local_ip_set")]\r
   public static extern void switch_t38_options_t_local_ip_set(HandleRef jarg1, string jarg2);\r
@@ -6388,10 +6388,10 @@ class freeswitchPINVOKE {
   public static extern string switch_t38_options_t_local_ip_get(HandleRef jarg1);\r
 \r
   [DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_local_port_set")]\r
-  public static extern void switch_t38_options_t_local_port_set(HandleRef jarg1, uint jarg2);\r
+  public static extern void switch_t38_options_t_local_port_set(HandleRef jarg1, ushort jarg2);\r
 \r
   [DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_local_port_get")]\r
-  public static extern uint switch_t38_options_t_local_port_get(HandleRef jarg1);\r
+  public static extern ushort switch_t38_options_t_local_port_get(HandleRef jarg1);\r
 \r
   [DllImport("mod_managed", EntryPoint="CSharp_new_switch_t38_options_t")]\r
   public static extern IntPtr new_switch_t38_options_t();\r
@@ -29741,12 +29741,12 @@ public class switch_t38_options_t : IDisposable {
     } \r
   }\r
 \r
-  public uint remote_port {\r
+  public ushort remote_port {\r
     set {\r
       freeswitchPINVOKE.switch_t38_options_t_remote_port_set(swigCPtr, value);\r
     } \r
     get {\r
-      uint ret = freeswitchPINVOKE.switch_t38_options_t_remote_port_get(swigCPtr);\r
+      ushort ret = freeswitchPINVOKE.switch_t38_options_t_remote_port_get(swigCPtr);\r
       return ret;\r
     } \r
   }\r
@@ -29761,12 +29761,12 @@ public class switch_t38_options_t : IDisposable {
     } \r
   }\r
 \r
-  public uint local_port {\r
+  public ushort local_port {\r
     set {\r
       freeswitchPINVOKE.switch_t38_options_t_local_port_set(swigCPtr, value);\r
     } \r
     get {\r
-      uint ret = freeswitchPINVOKE.switch_t38_options_t_local_port_get(swigCPtr);\r
+      ushort ret = freeswitchPINVOKE.switch_t38_options_t_local_port_get(swigCPtr);\r
       return ret;\r
     } \r
   }\r