[asterisk-dev] [asterisk-commits] russell: branch 1.4 r179532 - /branches/1.4/apps/app_meetme.c

Russell Bryant russell at digium.com
Tue Mar 3 06:59:23 CST 2009


On Mar 3, 2009, at 6:40 AM, Kevin P. Fleming wrote:

> SVN commits to the Asterisk project wrote:
>
>> This bug manifested itself while dvossel was doing some testing of  
>> MeetMe in
>> Asterisk trunk.  He was using the timerfd timing module.  When the  
>> code hit
>> ast_read() erroneously, it determined that it must have been called  
>> because of
>> input on the timer fd, as chan->fdno was set to AST_TIMING_FD,  
>> since that was
>> the cause of the last legitimate call to ast_read() done by  
>> autoservice.
>
> How about making ast_read() clear chan->fdno when it gets called, so
> that stale information isn't left in the channel structure? It would
> probably have to be set to -1, since 0 is a valid value.


That's a good idea.

That way, if ast_read() is called at a bad time anywhere else, it will  
definitely end up calling the channel read callback.  That will either  
return NULL, or &ast_null_frame with an error message, IIRC, depending  
on the channel driver.  This is better, as we'll always see a symptom  
if this happens.

--
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org







More information about the asterisk-dev mailing list