simplify switch_core_service_session to protect against a race condition

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10136 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-10-23 23:48:11 +00:00
1 parent e520638b92
commit 42dd42ebb6
7 files changed
+42 -52

No files matched your search

@@ -5441,22 +5441,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_launch_thread(void * jarg
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_thread_session_end(void * jarg1) {
switch_core_thread_session_t *arg1 = (switch_core_thread_session_t *) 0 ;
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
arg1 = (switch_core_thread_session_t *)jarg1;
arg1 = (switch_core_session_t *)jarg1;
switch_core_thread_session_end(arg1);
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_service_session(void * jarg1, void * jarg2, int jarg3) {
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_service_session(void * jarg1) {
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
switch_core_thread_session_t *arg2 = (switch_core_thread_session_t *) 0 ;
int arg3 ;
arg1 = (switch_core_session_t *)jarg1;
arg2 = (switch_core_thread_session_t *)jarg2;
arg3 = (int)jarg3;
switch_core_service_session(arg1,arg2,arg3);
switch_core_service_session(arg1);
}
@@ -1262,12 +1262,12 @@ public class freeswitch {
freeswitchPINVOKE.switch_core_session_launch_thread(SWIGTYPE_p_switch_core_session.getCPtr(session), SWIGTYPE_p_f_p_switch_thread_t_p_void__p_void.getCPtr(func), SWIGTYPE_p_void.getCPtr(obj));
}
public static void switch_core_thread_session_end(switch_core_thread_session thread_session) {
freeswitchPINVOKE.switch_core_thread_session_end(switch_core_thread_session.getCPtr(thread_session));
public static void switch_core_thread_session_end(SWIGTYPE_p_switch_core_session session) {
freeswitchPINVOKE.switch_core_thread_session_end(SWIGTYPE_p_switch_core_session.getCPtr(session));
}
public static void switch_core_service_session(SWIGTYPE_p_switch_core_session session, switch_core_thread_session thread_session, int stream_id) {
freeswitchPINVOKE.switch_core_service_session(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_core_thread_session.getCPtr(thread_session), stream_id);
public static void switch_core_service_session(SWIGTYPE_p_switch_core_session session) {
freeswitchPINVOKE.switch_core_service_session(SWIGTYPE_p_switch_core_session.getCPtr(session));
}
public static switch_call_cause_t switch_core_session_outgoing_channel(SWIGTYPE_p_switch_core_session session, switch_event var_event, string endpoint_name, switch_caller_profile caller_profile, SWIGTYPE_p_p_switch_core_session new_session, SWIGTYPE_p_p_apr_pool_t pool, uint flags) {
@@ -5449,7 +5449,7 @@ class freeswitchPINVOKE {
public static extern void switch_core_thread_session_end(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_service_session")]
public static extern void switch_core_service_session(HandleRef jarg1, HandleRef jarg2, int jarg3);
public static extern void switch_core_service_session(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_outgoing_channel")]
public static extern int switch_core_session_outgoing_channel(HandleRef jarg1, HandleRef jarg2, string jarg3, HandleRef jarg4, HandleRef jarg5, HandleRef jarg6, uint jarg7);