[Freeswitch-svn] [commit] r9663 - freeswitch/trunk/src/mod/asr_tts/mod_cepstral

Freeswitch SVN mikej at freeswitch.org
Fri Sep 26 14:14:37 EDT 2008


Author: mikej
Date: Fri Sep 26 14:14:37 2008
New Revision: 9663

Modified:
   freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c

Log:
extra protection

Modified: freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c
==============================================================================
--- freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c	(original)
+++ freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c	Fri Sep 26 14:14:37 2008
@@ -150,7 +150,7 @@
 		voice_name = NULL;
 	}
 
-	if (!voice_name) {
+	if (switch_strlen_zero(voice_name)) {
 		/* Find the first voice on the system */
 		if ((cepstral->voice = swift_port_find_first_voice(cepstral->port, NULL, NULL)) == NULL) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to find any voices!\n");
@@ -219,6 +219,9 @@
 
 	cepstral->tts_stream = NULL;
 
+	if (switch_strlen_zero(text)) {
+		return SWITCH_STATUS_FALSE;
+	}
 	if (!strncasecmp(text, fp, len)) {
 		text += len;
 		if (switch_strlen_zero(text)) {



More information about the Freeswitch-svn mailing list