make session.ready work on uninit session containers

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13965 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-06-25 19:50:00 +00:00
parent 002e97848c
commit 83ebebc52b

View File

@ -874,7 +874,12 @@ SWITCH_DECLARE(int) CoreSession::sleep(int ms, int sync) {
SWITCH_DECLARE(bool) CoreSession::ready() {
this_check(false);
sanity_check(false);
if (!session) {
return false;
}
sanity_check(false);
return switch_channel_ready(channel) != 0;
}