[Freeswitch-branches] [commit] r13593 - freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia
Author: brian Date: Wed Jun 3 15:57:57 2009 New Revision: 13593 Log: fix compile warnings for windows Modified: freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Modified: freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c ============================================================================== --- freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c (original) +++ freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c Wed Jun 3 15:57:57 2009 @@ -2172,7 +2172,7 @@ } else if (!strcasecmp(var, "cng-pt") && !sofia_test_pflag(profile, PFLAG_SUPPRESS_CNG)) { profile->cng_pt = (switch_payload_t) atoi(val); } else if (!strcasecmp(var, "sip-port")) { - profile->sip_port = atoi(val); + profile->sip_port = (switch_port_t)atoi(val); } else if (!strcasecmp(var, "vad")) { if (!strcasecmp(val, "in")) { sofia_set_flag(profile, TFLAG_VAD_IN); @@ -2501,7 +2501,7 @@ } else if (!strcasecmp(var, "tls-bind-params")) { profile->tls_bind_params = switch_core_strdup(profile->pool, val); } else if (!strcasecmp(var, "tls-sip-port")) { - profile->tls_sip_port = atoi(val); + profile->tls_sip_port = (switch_port_t)atoi(val); } else if (!strcasecmp(var, "tls-cert-dir")) { profile->tls_cert_dir = switch_core_strdup(profile->pool, val); } else if (!strcasecmp(var, "tls-version")) { @@ -2569,7 +2569,7 @@ } if (!profile->sip_port) { - profile->sip_port = atoi(SOFIA_DEFAULT_PORT); + profile->sip_port = (switch_port_t)atoi(SOFIA_DEFAULT_PORT); } if (!profile->dialplan) { @@ -2632,7 +2632,7 @@ */ if (sofia_test_pflag(profile, PFLAG_TLS)) { if (!profile->tls_sip_port) { - profile->tls_sip_port = atoi(SOFIA_DEFAULT_TLS_PORT); + profile->tls_sip_port = (switch_port_t)atoi(SOFIA_DEFAULT_TLS_PORT); } if (profile->extsipip && sofia_test_pflag(profile, PFLAG_AUTO_NAT)) { @@ -4505,9 +4505,10 @@ if (sip->sip_contact && sip->sip_contact->m_url) { char tmp[35] = ""; + const char *ipv6 = strchr(tech_pvt->remote_ip, ':'); + transport = sofia_glue_url2transport(sip->sip_contact->m_url); - const char *ipv6 = strchr(tech_pvt->remote_ip, ':'); tech_pvt->record_route = switch_core_session_sprintf(session, "sip:%s@%s%s%s:%d;transport=%s", Modified: freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c ============================================================================== --- freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original) +++ freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Wed Jun 3 15:57:57 2009 @@ -665,8 +665,8 @@ } } - if (sofia_glue_check_nat(tech_pvt->profile, tech_pvt->remote_ip)) { - tech_pvt->adv_sdp_audio_ip = switch_core_session_strdup(tech_pvt->session, tech_pvt->profile->extrtpip); + if (tech_pvt->profile->extrtpip && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->remote_ip)) { + tech_pvt->adv_sdp_audio_ip = switch_core_session_strdup(tech_pvt->session, tech_pvt->profile->extrtpip); switch_nat_add_mapping((switch_port_t)sdp_port, SWITCH_NAT_UDP); } else { tech_pvt->adv_sdp_audio_ip = switch_core_session_strdup(tech_pvt->session, ip);
participants (1)
-
FreeSWITCH SVN