提交 3d3ee88d authored 作者: Michael Jerris's avatar Michael Jerris

wrong fix to avoid seg. The threadstate needs to be moved to the private so…

wrong fix to avoid seg.  The threadstate needs to be moved to the private so that it's not dependent on the switch_core_session_t like in python.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6870 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 0fe7efe7
...@@ -326,7 +326,7 @@ int CoreSession::originate(CoreSession *a_leg_session, ...@@ -326,7 +326,7 @@ int CoreSession::originate(CoreSession *a_leg_session,
// no valid channel. since the threadstate is stored in the channel, and there // no valid channel. since the threadstate is stored in the channel, and there
// is none, if we try to call begin_alllow_threads it will fail miserably. // is none, if we try to call begin_alllow_threads it will fail miserably.
// use the 'a leg session' to do the thread swapping stuff. // use the 'a leg session' to do the thread swapping stuff.
a_leg_session->begin_allow_threads(); if (a_leg_session) a_leg_session->begin_allow_threads();
if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) { if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
...@@ -347,11 +347,11 @@ int CoreSession::originate(CoreSession *a_leg_session, ...@@ -347,11 +347,11 @@ int CoreSession::originate(CoreSession *a_leg_session,
} }
a_leg_session->end_allow_threads(); if (a_leg_session) a_leg_session->end_allow_threads();
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
failed: failed:
a_leg_session->end_allow_threads(); if (a_leg_session) a_leg_session->end_allow_threads();
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论