From: Anthony Minessale Date: Thu, 25 Jun 2009 19:50:00 +0000 (+0000) Subject: make session.ready work on uninit session containers X-Git-Tag: v1.0.4~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83ebebc52baccc3cc2580944351f02054d52e694;p=thirdparty%2Ffreeswitch.git make session.ready work on uninit session containers git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13965 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index c30c638f46..83008c8097 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -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; }