Revision
15373
Author
anthm
Date
2009-11-05 11:22:15 -0600 (Thu, 05 Nov 2009)

Log Message

fix some win32 issues in sofia 

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (15372 => 15373)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-11-05 13:41:11 UTC (rev 15372)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-11-05 17:22:15 UTC (rev 15373)
@@ -207,7 +207,7 @@
 											  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 @@
 		}
 
 		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;

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15372 => 15373)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-11-05 13:41:11 UTC (rev 15372)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-11-05 17:22:15 UTC (rev 15373)
@@ -2855,7 +2855,7 @@
 					} 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 @@
 				
 				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");
+					switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 					goto done;
-					switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 				} else {
 					switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Processing updated SDP\n");
 				}

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c (15372 => 15373)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	2009-11-05 13:41:11 UTC (rev 15372)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	2009-11-05 17:22:15 UTC (rev 15373)
@@ -1660,6 +1660,7 @@
 
 			*/
 
+
 			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 @@
 								 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) {

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (15372 => 15373)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	2009-11-05 13:41:11 UTC (rev 15372)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	2009-11-05 17:22:15 UTC (rev 15373)
@@ -2068,7 +2068,6 @@
 
 
 	if (nc && cnonce && qop) {
-		char *sql;
 
 #if defined(_WIN32) && !defined(_WIN64)
 #define	LL_FMT "ll"