From: Anthony Minessale Date: Fri, 4 Feb 2011 16:58:26 +0000 (-0600) Subject: add sanity check on jitterbuffer debug X-Git-Tag: v1.2-rc1~187^2~13^2~3^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36f6218b8bba3233cf3fb501b01a0288a08e9f00;p=thirdparty%2Ffreeswitch.git add sanity check on jitterbuffer debug --- diff --git a/src/switch_rtp.c b/src/switch_rtp.c index e8d7558bce..4df867aa64 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1875,6 +1875,10 @@ static void jb_logger(const char *file, const char *func, int line, int level, c SWITCH_DECLARE(switch_status_t) switch_rtp_debug_jitter_buffer(switch_rtp_t *rtp_session, const char *name) { + if (!switch_rtp_ready(rtp_session)) { + return SWITCH_STATUS_FALSE; + } + stfu_n_debug(rtp_session->jb, name); stfu_global_set_logger(jb_logger);