From f46044c932c8b553c857b122bcc9e9e8004c3531 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sat, 19 Jul 2008 15:16:29 +0000 Subject: [PATCH] build tweaks git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9107 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_event.h | 2 +- .../mod_voicemail/mod_voicemail.c | 22 +++++++++---------- src/mod/endpoints/mod_sofia/sofia_glue.c | 2 +- src/switch_event.c | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/include/switch_event.h b/src/include/switch_event.h index f68f5b3631..c6df3f5c0d 100644 --- a/src/include/switch_event.h +++ b/src/include/switch_event.h @@ -135,7 +135,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_set_priority(switch_event_t *event, \param header_name the name of the header to read \return the value of the requested header */ - _Ret_opt_z_ SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, char *header_name); + _Ret_opt_z_ SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, const char *header_name); #define switch_event_get_header_nil(e, h) switch_str_nil(switch_event_get_header(e,h)) diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index 06349f4373..bce8565dba 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -1901,7 +1901,7 @@ static void deliver_vm(vm_profile_t *profile, char *body; char *headers; char *header_string; - char tmp[50] = ""; + char tmpvar[50] = ""; int total_new_messages = 0; int total_saved_messages = 0; int total_new_urgent_messages = 0; @@ -1921,14 +1921,14 @@ static void deliver_vm(vm_profile_t *profile, switch_strftime(date, &retsize, sizeof(date), profile->date_fmt, &tm); switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_current_folder", myfolder); - switch_snprintf(tmp, sizeof(tmp), "%d", total_new_messages); - switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_total_new_messages", tmp); - switch_snprintf(tmp, sizeof(tmp), "%d", total_saved_messages); - switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_total_saved_messages", tmp); - switch_snprintf(tmp, sizeof(tmp), "%d", total_new_urgent_messages); - switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_urgent_new_messages", tmp); - switch_snprintf(tmp, sizeof(tmp), "%d", total_saved_urgent_messages); - switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_urgent_saved_messages", tmp); + switch_snprintf(tmpvar, sizeof(tmpvar), "%d", total_new_messages); + switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_total_new_messages", tmpvar); + switch_snprintf(tmpvar, sizeof(tmpvar), "%d", total_saved_messages); + switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_total_saved_messages", tmpvar); + switch_snprintf(tmpvar, sizeof(tmpvar), "%d", total_new_urgent_messages); + switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_urgent_new_messages", tmpvar); + switch_snprintf(tmpvar, sizeof(tmpvar), "%d", total_saved_urgent_messages); + switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_urgent_saved_messages", tmpvar); switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_account", myid); switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_domain", domain_name); switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_caller_id_number", caller_id_number); @@ -1936,8 +1936,8 @@ static void deliver_vm(vm_profile_t *profile, switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_file_path", file_path); switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_read_flags", read_flags); switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_time", date); - switch_snprintf(tmp, sizeof(tmp), "%d", priority); - switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_priority", tmp); + switch_snprintf(tmpvar, sizeof(tmpvar), "%d", priority); + switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_priority", tmpvar); if (vm_email) { switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_email", vm_email); } diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index f393f9ad06..e83f60b6d7 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -918,7 +918,7 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt) q = tech_pvt->local_sdp_str; while(p && *p) { - if (!strncmp("c=IN IP", p, 7)) { + if (tech_pvt->adv_sdp_audio_ip && !strncmp("c=IN IP", p, 7)) { strncpy(q, p, 9); p += 9; q += 9; diff --git a/src/switch_event.c b/src/switch_event.c index 0c570cd0c9..adc9c21b94 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -555,7 +555,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_set_priority(switch_event_t *event, return SWITCH_STATUS_SUCCESS; } -SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, char *header_name) +SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, const char *header_name) { switch_event_header_t *hp; switch_assert(event);