[En-Nut-Discussion] HDLC_SETIFNET bug.

Francois Rademeyer francois at asnone.com
Wed Jul 21 13:14:34 CEST 2004


Hi,

There is a bug in "ahdlcavr.c" at line 410:

if (dev->dev_icb == 0)
 break;

only exits the first while loop, but should in fact exit the for(;;) loop
aswell.

This bug both prohibits the closure of a PPP connection, aswell as the
working of the command _ioctl(dev, HDLC_SETIFNET, NULL).

Cheers,
Francois

      for (;;) {
            /*
             * If we are still connected to a network, fetch the next
             * character from the buffer.
             */
            while (dcb->dcb_rd_idx == dcb->dcb_rx_idx) {
                if (dev->dev_icb == 0)
                    break;
                /* TODO: Check for idle timeout. */
                if (NutEventWait(&dcb->dcb_rx_rdy, dcb->dcb_rtimeout)) {
                    continue;
                }
            }




More information about the En-Nut-Discussion mailing list