[Freeswitch-svn] [commit] r10077 - freeswitch/trunk/src/mod/applications/mod_voicemail

Freeswitch SVN mikej at freeswitch.org
Mon Oct 20 08:54:38 EDT 2008


Author: mikej
Date: Mon Oct 20 08:54:37 2008
New Revision: 10077

Modified:
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c

Log:
(FSBUILD-83) no need to allocate this twice

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	Mon Oct 20 08:54:37 2008
@@ -1548,7 +1548,6 @@
 
 static void update_mwi(vm_profile_t *profile, const char *id, const char *domain_name, const char *myfolder)
 {
-	char *mwi_id;
 	const char *yn = "no";
 	int total_new_messages = 0;
 	int total_saved_messages = 0;
@@ -1565,13 +1564,10 @@
 	if (total_new_messages || total_new_urgent_messages) {
 		yn = "yes";
 	}
-	mwi_id = switch_mprintf("%s@%s", id, domain_name);
-	switch_assert(mwi_id);
 	switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Messages-Waiting", "%s", yn);
-	switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", mwi_id);
+	switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Message-Account", "%s@%s", id, domain_name);
 	switch_event_add_header(event, SWITCH_STACK_BOTTOM, "MWI-Voice-Message", "%d/%d (%d/%d)", total_new_messages, total_saved_messages, total_new_urgent_messages, total_saved_urgent_messages);
 	switch_event_fire(&event);
-	switch_safe_free(mwi_id);
 }
 
 



More information about the Freeswitch-svn mailing list