<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">what exactly are you trying to accomplish by not using the timers?<div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 17, 2018, at 10:07 PM, kaiduan xie <<a href="mailto:kaiduanx@yahoo.ca" class="">kaiduanx@yahoo.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;" class=""><div class="">Hi,</div><div class=""><br class=""></div><div class="">For my application, I made some changes in switch_rtp to use poll to read from network instead of synchronising on timer,</div><div class=""><br class=""></div><div class=""><span class="">switch_rtp_clear_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER);</span><br class=""></div><div class=""><span class=""><br class=""></span></div><div class="">I observed a weird behaviour with regarding to switch_poll, it blocks with 20ms always even the timer value is 10 ms when there are no packet received on network.</div><div class=""><br class=""></div><div class=""><span class=""><div class="">+ pt = 10 * 1000; // 10ms</div><div class="">+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG, "+poll reading:%d\n", pt);</div><div class=""> }</div><div class=""> </div><div class=""> poll_status = switch_poll(rtp_session->read_pollfd, 1, &fdr, pt);</div><div class="">+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG, "-poll reading:%d:%d\n", pt, poll_status);</div><div class=""><br class=""></div><div class="">The following is from the log,</div><div class=""><br class=""></div><div class=""><span class=""><div class="">0c19d3aa-429e-11e8-bbd0-fb8396b8383d 2018-04-17 20:21:31.453604 [DEBUG] [23807] switch_rtp.c:7001 +poll reading:10000</div><div class="">0c19d3aa-429e-11e8-bbd0-fb8396b8383d 2018-04-17 20:21:31.473649 [DEBUG] [23807] switch_rtp.c:7005 -poll reading:10000:2</div></span><br class=""></div></span></div><div class="">Any idea? This is really weird, I expect switch_poll works as select.</div><div class=""><br class=""></div><div class="">Many thanks for help.</div><div class=""><br class=""></div><div class="">/Kaiduan</div></div></div></div></blockquote></div><br class=""></div></body></html>