From 83ebebc52baccc3cc2580944351f02054d52e694 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 25 Jun 2009 19:50:00 +0000 Subject: [PATCH] make session.ready work on uninit session containers git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13965 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_cpp.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; }