[Freeswitch-svn] [commit] r10211 - in freeswitch/trunk/src: . mod/applications/mod_voicemail mod/endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Fri Oct 31 14:22:01 EDT 2008


Author: mikej
Date: Fri Oct 31 14:22:00 2008
New Revision: 10211

Modified:
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
   freeswitch/trunk/src/switch_utils.c

Log:
windows build fixes.

Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	Fri Oct 31 14:22:00 2008
@@ -2249,21 +2249,21 @@
 
 	if (insert_db && switch_file_exists(file_path, pool) == SWITCH_STATUS_SUCCESS) {
 		char *usql;
-		switch_event_t *params;
+		switch_event_t *message_event;
 		
-		switch_event_create_subclass(&params, SWITCH_EVENT_CUSTOM, VM_EVENT_MAINT);
-		switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Action", "leave-message");
-		switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-User", myid);
-		switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Domain", domain_name);
-		switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Caller-ID-Name", caller_id_name);
-		switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Caller-ID-Number", caller_id_number);
-		switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-File-Path", file_path);
-		switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Flags", read_flags);
-		switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Folder", myfolder);
-		switch_event_add_header(params, SWITCH_STACK_BOTTOM, "VM-Message-Len", "%u", message_len);
-		switch_event_add_header(params, SWITCH_STACK_BOTTOM, "VM-Timestamp", "%lu", (unsigned long) switch_timestamp(NULL));
+		switch_event_create_subclass(&message_event, SWITCH_EVENT_CUSTOM, VM_EVENT_MAINT);
+		switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "VM-Action", "leave-message");
+		switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "VM-User", myid);
+		switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "VM-Domain", domain_name);
+		switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "VM-Caller-ID-Name", caller_id_name);
+		switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "VM-Caller-ID-Number", caller_id_number);
+		switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "VM-File-Path", file_path);
+		switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "VM-Flags", read_flags);
+		switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "VM-Folder", myfolder);
+		switch_event_add_header(message_event, SWITCH_STACK_BOTTOM, "VM-Message-Len", "%u", message_len);
+		switch_event_add_header(message_event, SWITCH_STACK_BOTTOM, "VM-Timestamp", "%lu", (unsigned long) switch_timestamp(NULL));
 
-		switch_event_fire(&params);
+		switch_event_fire(&message_event);
 
 		usql = switch_mprintf("insert into voicemail_msgs values(%ld,0,'%q','%q','%q','%q','%q','%q','%q','%u','','%q')", (long) switch_timestamp(NULL),
 							  myid, domain_name, uuid_str, caller_id_name, caller_id_number,

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	Fri Oct 31 14:22:00 2008
@@ -1205,8 +1205,7 @@
 	id = switch_mprintf("sip:%s@%s", sub_to_user, sub_to_host);
 
 	contact = sofia_glue_get_url_from_contact(o_contact, 1);
-	if ((route = strstr(o_contact, ";fs_path="))) {
-		route = strdup(route + 9);
+	if ((route = strstr(o_contact, ";fs_path=")) && (route = strdup(route + 9))) {
 		
 		for (p = route; p && *p ; p++) {
 			if (*p == '>' || *p == ';') {

Modified: freeswitch/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/trunk/src/switch_utils.c	(original)
+++ freeswitch/trunk/src/switch_utils.c	Fri Oct 31 14:22:00 2008
@@ -1071,7 +1071,7 @@
 	switch_assert(buf);
 	*buf = '\0';
 	if (sa) {
-		getnameinfo(sa, salen, buf, len, NULL, 0, NI_NUMERICHOST);
+		getnameinfo(sa, salen, buf, (socklen_t)len, NULL, 0, NI_NUMERICHOST);
 	}
 	return buf;
 }



More information about the Freeswitch-svn mailing list