From: Steve K. <st...@st...> - 2003-12-27 15:59:47
|
Hey Steve, Thanks so much for tracking this one down! I think this has likely been the cause of lots of people's troubles with IAX2 -- from missing incoming calls, to timeout errors, etc.. I'll apply this to CVS on monday, and include it in diffs I send along to Mark. (I'm assuming that's OK with you; you know kram's licensing policy on stuff he puts in digium CVS). -SteveK Steve Underwood wrote: > Hi all, > > I found another nasty bug in IAX2 support in iaxclient. The attached > patch if for the file iax2/src/iax.c. It makes sure events are always > delivered. Previously I was missing a lot of hangup messages. > > Regards, > Steve > >------------------------------------------------------------------------ > >--- iax.c.ref 2003-12-27 22:19:51.000000000 +0800 >+++ iax.c 2003-12-27 22:20:22.000000000 +0800 >@@ -1830,11 +1830,14 @@ > if ((ms > -4) || (e->etype != IAX_EVENT_VOICE)) { > /* Return the event immediately if it's it's less than 3 milliseconds > too late, or if it's not voice (believe me, you don't want to > just drop a hangup frame because it's late, or a ping, or some such. > That kinda ruins retransmissions too ;-) */ >- return e; >+ /* Queue for immediate delivery */ >+ iax_sched_event(e, NULL, 0); >+ return NULL; >+ //return e; > } > DEBU(G "(not so) Silently dropping a packet (ms = %d)\n", ms); > /* Silently discard this as if it were to be delivered */ > free(e); > return NULL; > > |