----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/3704/#review12439 -----------------------------------------------------------
trunk/main/utils.c <https://reviewboard.asterisk.org/r/3704/#comment22703> If fflush does not always reset errno then this is not paranoia, it's a reaction to reality. Start the comment with: fflush() does not... Assuming you are correct about fflush not resetting errno, we probably want "errno = 0;" before the loop as well. This way the first loop iteration cannot see the errno from fwrite above. - Corey Farrell On July 2, 2014, 12:04 p.m., one47 wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviewboard.asterisk.org/r/3704/ > ----------------------------------------------------------- > > (Updated July 2, 2014, 12:04 p.m.) > > > Review request for Asterisk Developers. > > > Bugs: ASTERISK-23984 > https://issues.asterisk.org/jira/browse/ASTERISK-23984 > > > Repository: Asterisk > > > Description > ------- > > Discovered this by playing with WebRTC - It occurs sometimes if the websocket > client closes the connection suddenly. > > fflush() does not always reset errno correctly, particularly at EOF, and can > cause a 100% CPU infinite loop. > > > Diffs > ----- > > trunk/main/utils.c 417704 > > Diff: https://reviewboard.asterisk.org/r/3704/diff/ > > > Testing > ------- > > Repeated websocket opens/closes to be sure the issue is gone. > > > Thanks, > > one47 > >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev