]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
windows build fixes.
authorMichael Jerris <mike@jerris.com>
Fri, 31 Oct 2008 18:22:00 +0000 (18:22 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 31 Oct 2008 18:22:00 +0000 (18:22 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10211 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_voicemail/mod_voicemail.c
src/mod/endpoints/mod_sofia/sofia_presence.c
src/switch_utils.c

index 3bcf8ae968c095571d12fcf542682c69659bdc86..f02a9a70e5b57a9211bc46d66a77411e0eda84f5 100644 (file)
@@ -2249,21 +2249,21 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
 
        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_fire(&params);
+               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(&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,
index c17af3513fc82d9aec24c1fb4bdd069d76145b7f..15735307db6c0517021b14ad8a6327e40948feeb 100644 (file)
@@ -1205,8 +1205,7 @@ static int sofia_presence_mwi_callback2(void *pArg, int argc, char **argv, char
        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 == ';') {
index dfced8df5becf6aee0aaf5b2b1673b4773f7c9e1..ae3c6acc6e6612646fcd02f91e8976e0439bc626 100644 (file)
@@ -1071,7 +1071,7 @@ SWITCH_DECLARE(char *) get_addr(char *buf, switch_size_t len, struct sockaddr *s
        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;
 }