[Freeswitch-svn] [commit] r6970 - freeswitch/trunk/src/mod/asr_tts/mod_openmrcp

Freeswitch SVN achaloyan at freeswitch.org
Mon Dec 24 13:18:35 EST 2007


Author: achaloyan
Date: Mon Dec 24 13:18:34 2007
New Revision: 6970

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

Log:
not to add mrcp profile to profile_hash, if it failed to run

Modified: freeswitch/trunk/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c
==============================================================================
--- freeswitch/trunk/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c	(original)
+++ freeswitch/trunk/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c	Mon Dec 24 13:18:34 2007
@@ -836,8 +836,13 @@
 			
 			/* add profile */
 			if (!switch_core_hash_find(openmrcp_module.profile_hash, mrcp_profile->name)) {
-				switch_core_hash_insert(openmrcp_module.profile_hash, mrcp_profile->name, mrcp_profile);
-				openmrcp_profile_run(mrcp_profile);
+				if(openmrcp_profile_run(mrcp_profile) == SWITCH_STATUS_SUCCESS) {
+					switch_core_hash_insert(openmrcp_module.profile_hash, mrcp_profile->name, mrcp_profile);
+				}
+			}
+			else {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, 
+					"profile with the name [%s] already exists\n", mrcp_profile->name);
 			}
 		}
 	}



More information about the Freeswitch-svn mailing list