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

Freeswitch SVN mikej at freeswitch.org
Wed Aug 27 22:21:21 EDT 2008


Author: mikej
Date: Wed Aug 27 22:21:21 2008
New Revision: 9374

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

Log:
fix handling of error cases in voicemail_inject (MODAPP-133)

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	Wed Aug 27 22:21:21 2008
@@ -2141,6 +2141,7 @@
 
 	if ((argc = switch_separate_string(dup, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) < 2) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "not enough args [%s]\n", data);
+		status = SWITCH_STATUS_FALSE;
 		goto end;
 	}
 
@@ -2166,6 +2167,7 @@
 	
 	if (!(user && domain)) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid syntax [%s][%s]\n", switch_str_nil(user), switch_str_nil(domain));
+		status = SWITCH_STATUS_FALSE;
 		goto end;
 	}
 
@@ -2175,6 +2177,7 @@
 	
 	if (!profile) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find profile\n");
+		status = SWITCH_STATUS_FALSE;
 	} else {
 		switch_xml_t x_domain, xml_root;
 		switch_event_t *my_params = NULL;
@@ -2187,6 +2190,7 @@
 		
 		if (switch_xml_locate_domain(domain, my_params, &xml_root, &x_domain) != SWITCH_STATUS_SUCCESS) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot locate domain %s\n", domain);
+			status = SWITCH_STATUS_FALSE;
 			switch_event_destroy(&my_params);
 			goto end;
 		}



More information about the Freeswitch-svn mailing list