mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-06 04:11:52 +00:00
even more lang stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9063 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -10,7 +10,7 @@ Session::Session():CoreSession()
|
||||
py_init_vars();
|
||||
}
|
||||
|
||||
Session::Session(char *uuid):CoreSession(uuid)
|
||||
Session::Session(char *nuuid, CoreSession *a_leg):CoreSession(nuuid, a_leg)
|
||||
{
|
||||
py_init_vars();
|
||||
}
|
||||
@@ -59,6 +59,9 @@ bool Session::begin_allow_threads()
|
||||
|
||||
if (!TS) {
|
||||
TS = PyEval_SaveThread();
|
||||
if (channel) {
|
||||
switch_channel_set_private(channel, "SwapInThreadState", TS);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -75,6 +78,10 @@ bool Session::end_allow_threads()
|
||||
PyEval_RestoreThread(TS);
|
||||
TS = NULL;
|
||||
|
||||
if (channel) {
|
||||
switch_channel_set_private(channel, "SwapInThreadState", NULL);
|
||||
}
|
||||
|
||||
do_hangup_hook();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user