[Freeswitch-svn] [commit] r9107 - in freeswitch/trunk/src: . include mod/applications/mod_voicemail mod/endpoints/mod_sofia
Freeswitch SVN
mikej at freeswitch.org
Sat Jul 19 11:16:30 EDT 2008
Author: mikej
Date: Sat Jul 19 11:16:29 2008
New Revision: 9107
Modified:
freeswitch/trunk/src/include/switch_event.h
freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
freeswitch/trunk/src/switch_event.c
Log:
build tweaks
Modified: freeswitch/trunk/src/include/switch_event.h
==============================================================================
--- freeswitch/trunk/src/include/switch_event.h (original)
+++ freeswitch/trunk/src/include/switch_event.h Sat Jul 19 11:16:29 2008
@@ -135,7 +135,7 @@
\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))
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 Sat Jul 19 11:16:29 2008
@@ -1901,7 +1901,7 @@
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 @@
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 @@
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);
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Sat Jul 19 11:16:29 2008
@@ -918,7 +918,7 @@
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;
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Sat Jul 19 11:16:29 2008
@@ -555,7 +555,7 @@
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);
More information about the Freeswitch-svn
mailing list