[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Bug in SLIPIF.C ?
From: |
Winformatik Info |
Subject: |
[lwip-users] Bug in SLIPIF.C ? |
Date: |
Thu, 09 Sep 2004 17:03:15 +0200 |
User-agent: |
Thunderbird 0.7.1 (Windows/20040626) |
Hi
I have tried to use the slip driver (SLIPIF.C) of the lwIP (version
1.0). After a few problems I believe, that there is an error inside the
slipif_input() of the slip driver.
In the code fragment below there is the old faulty code and the new
replacement:
if ((p != NULL) && (recved < MAX_SIZE)) {
((u8_t *)p->payload)[i] = c;
recved++;
i++;
if (i >= p->len) {
i = 0;
// p = NULL; FIXME problem if more then one buffer
allocated by pbuf_alloc()
p = p->next; // corrected code, to go to next buffer
}
}
If no more data buffer space available in the chain, p->next holds a
NULL value. This signals the driver to allocate new buffers.
Is the correction above ok ?
Regards,
Roland
- [lwip-users] Bug in SLIPIF.C ?,
Winformatik Info <=