streamFiles 2nd argument is now optional. fix segfault that was happening with originate/bridge due to no valid session in b leg. rename streamfile to streamFile. remove playFile since streamFile does the same thing

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5454 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Traun Leyden
2007-06-24 17:38:17 +00:00
parent d2d87cf6a1
commit 700aa0df56
6 changed files with 47 additions and 109 deletions
+4 -3
View File
@@ -177,18 +177,19 @@ static void eval_some_python(char *uuid, char *args, switch_core_session_t *sess
// will be null
if (swapin_tstate == NULL) {
// swap it out
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Threadstate mod_python.c swap-out! \n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Threadstate mod_python.c swap-out! \n");
// PyEval_ReleaseThread(cur_tstate);
swapin_tstate = (void *) PyEval_SaveThread();
switch_channel_set_private(channel, "SwapInThreadState", (void *) swapin_tstate);
}
else {
// thread state is already swapped out, so, nothing for us to do
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "according to chan priv data, already swapped out \n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "according to chan priv data, already swapped out \n");
}
}
else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Threadstate mod_python.c swap-out! \n");
// they ran python script from cmd line, behave a bit differently (untested)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Threadstate mod_python.c swap-out! \n");
PyEval_ReleaseThread(tstate);
}