]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix some win32 issues in sofia
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Nov 2009 17:22:15 +0000 (17:22 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Nov 2009 17:22:15 +0000 (17:22 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15373 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_reg.c

index 6b2e221187498fc63a3dc5e5b6641dd7b33a0476..358f5fff84ff97570508ccbd3612428632fb7f6d 100644 (file)
@@ -207,7 +207,7 @@ char *generate_pai_str(switch_core_session_t *session)
                                                                                          callee_name, callee_number, callee_name, callee_number);
                } else {
                        pai = switch_core_session_sprintf(tech_pvt->session, "P-Asserted-Identity: \"%s\" <%s>\n", 
-                                                                                         callee_name, callee_number, callee_name, callee_number);
+                                                                                         callee_name, callee_number);
                }
        }
        return pai;
@@ -2958,9 +2958,9 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
                }
 
                if ((host = switch_core_session_strdup(nsession, tech_pvt->dest))) {
-                       char *p = strchr(host, '@');
-                       if (p) {
-                               host = p+1;
+                       char *pp = strchr(host, '@');
+                       if (pp) {
+                               host = pp+1;
                        } else {
                                host = NULL;
                                dest_to = NULL;
index 96bef028bda6ba78bfd74c13e45c922abd82235c..9bd58bb845c3dc51b85b4e804f15b43d33289c96 100644 (file)
@@ -2855,7 +2855,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
                                        } else if (!strcasecmp(var, "challenge-realm")) {
                                                profile->challenge_realm = switch_core_strdup(profile->pool, val);
                                        } else if (!strcasecmp(var, "dtmf-duration")) {
-                                               int dur = atoi(val);
+                                               uint32_t dur = atoi(val);
                                                if (dur > switch_core_min_dtmf_duration(0) && dur < switch_core_max_dtmf_duration(0)) {
                                                        profile->dtmf_duration = dur;
                                                } else {
@@ -4030,8 +4030,8 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                
                                if (sofia_glue_activate_rtp(tech_pvt, 0) != SWITCH_STATUS_SUCCESS) {
                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "RTP Error!\n");
-                                       goto done;
                                        switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+                                       goto done;
                                } else {
                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Processing updated SDP\n");
                                }
index 34a0d1aed1a8c3b78e9f846ac6f3e54b99b15661..d6c55670b5045b514f48b228bf06e157719f4d7c 100644 (file)
@@ -1660,6 +1660,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
 
                        */
 
+
                        sql = switch_mprintf("insert into sip_subscriptions "
                                                                 "(proto,sip_user,sip_host,sub_to_user,sub_to_host,presence_hosts,event,contact,call_id,full_from,"
                                                                 "full_via,expires,user_agent,accept,profile_name,hostname,network_port,network_ip) "
@@ -1667,7 +1668,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
                                                                 proto, from_user, from_host, to_user, to_host, profile->presence_hosts ? profile->presence_hosts : to_host, 
                                                                 event, contact_str, call_id, full_from, full_via, 
                                                                 //sofia_test_pflag(profile, PFLAG_MULTIREG) ? switch_epoch_time_now(NULL) + exp_delta : exp_delta * -1,
-                                                                switch_epoch_time_now(NULL) + exp_delta,
+                                                                (long)switch_epoch_time_now(NULL) + exp_delta,
                                                                 full_agent, accept, profile->name,mod_sofia_globals.hostname, network_port, network_ip);
                                                                 
                        if (mod_sofia_globals.debug_presence > 0) {
index e9e1f74bb294cc9e0f4e5a30f2b022aa8aa51baf..6ecd6f551adf3cd0e1a83e6880f6bb37e5897c49 100644 (file)
@@ -2068,7 +2068,6 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile,
 
 
        if (nc && cnonce && qop) {
-               char *sql;
 
 #if defined(_WIN32) && !defined(_WIN64)
 #define        LL_FMT "ll"