[Freeswitch-svn] [commit] r5707 - in freeswitch/trunk/src: . mod/applications/mod_conference
Freeswitch SVN
anthm at freeswitch.org
Fri Sep 14 16:00:26 EDT 2007
Author: anthm
Date: Fri Sep 14 16:00:26 2007
New Revision: 5707
Modified:
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/trunk/src/switch_buffer.c
freeswitch/trunk/src/switch_core_speech.c
Log:
fix small problem in speech stuff
Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Fri Sep 14 16:00:26 2007
@@ -2246,7 +2246,7 @@
if (!member->sh) {
memset(&member->lsh, 0, sizeof(member->lsh));
if (switch_core_speech_open(&member->lsh, conference->tts_engine, conference->tts_voice,
- conference->rate, conference->interval, &flags, fnode->pool) !=
+ conference->rate, conference->interval, &flags, switch_core_session_get_pool(member->session)) !=
SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module [%s]!\n", conference->tts_engine);
return SWITCH_STATUS_FALSE;
Modified: freeswitch/trunk/src/switch_buffer.c
==============================================================================
--- freeswitch/trunk/src/switch_buffer.c (original)
+++ freeswitch/trunk/src/switch_buffer.c Fri Sep 14 16:00:26 2007
@@ -266,12 +266,13 @@
SWITCH_DECLARE(void) switch_buffer_destroy(switch_buffer_t **buffer)
{
- if (*buffer && switch_test_flag((*buffer), SWITCH_BUFFER_FLAG_DYNAMIC)) {
- free((*buffer)->data);
- free(*buffer);
+ if (buffer && *buffer) {
+ if ((switch_test_flag((*buffer), SWITCH_BUFFER_FLAG_DYNAMIC))) {
+ switch_safe_free((*buffer)->data);
+ free(*buffer);
+ }
+ *buffer = NULL;
}
-
- *buffer = NULL;
}
/* For Emacs:
Modified: freeswitch/trunk/src/switch_core_speech.c
==============================================================================
--- freeswitch/trunk/src/switch_core_speech.c (original)
+++ freeswitch/trunk/src/switch_core_speech.c Fri Sep 14 16:00:26 2007
@@ -122,5 +122,11 @@
SWITCH_DECLARE(switch_status_t) switch_core_speech_close(switch_speech_handle_t *sh, switch_speech_flag_t *flags)
{
- return sh->speech_interface->speech_close(sh, flags);
+ switch_status_t status = sh->speech_interface->speech_close(sh, flags);
+
+ if (switch_test_flag(sh, SWITCH_SPEECH_FLAG_FREE_POOL)) {
+ switch_core_destroy_memory_pool(&sh->memory_pool);
+ }
+
+ return status;
}
More information about the Freeswitch-svn
mailing list