potential fix for MODLANG-54

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7995 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-04-01 02:34:58 +00:00
parent 94b2225873
commit 6d1f4f6de1
1 changed files with 6 additions and 4 deletions

View File

@ -85,10 +85,12 @@ CoreSession::CoreSession(switch_core_session_t *new_session)
{
memset(&caller_profile, 0, sizeof(caller_profile));
init_vars();
session = new_session;
channel = switch_core_session_get_channel(session);
allocated = 1;
switch_core_session_read_lock(session);
if (new_session) {
session = new_session;
channel = switch_core_session_get_channel(session);
allocated = 1;
switch_core_session_read_lock(session);
}
}
CoreSession::~CoreSession()