add sanity check on jitterbuffer debug

This commit is contained in:
Anthony Minessale 2011-02-04 10:58:26 -06:00
parent 2ec2a9b0d3
commit 36f6218b8b
1 changed files with 4 additions and 0 deletions

View File

@ -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);