11
0
Fork 0

Fix RTCP frame reception

we previously registred the FD for monitoring but never
read it, causing 100% CPU ... bad !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2009-09-29 20:52:04 +02:00
parent d3e9dc0488
commit ac8c9cc563
1 changed files with 17 additions and 1 deletions

View File

@ -472,7 +472,23 @@ static struct ast_frame *
openbsc_chan_read(struct ast_channel *chan) openbsc_chan_read(struct ast_channel *chan)
{ {
struct openbsc_chan_priv *p = chan->tech_pvt; struct openbsc_chan_priv *p = chan->tech_pvt;
return p->rtp ? ast_rtp_read(p->rtp) : &ast_null_frame; struct ast_frame *f;
if (!p->rtp)
return &ast_null_frame;
switch (chan->fdno) {
case 0:
f = ast_rtp_read(p->rtp);
break;
case 1:
f = ast_rtcp_read(p->rtp);
break;
default:
f = &ast_null_frame;
}
} }
static int static int