[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] bug about pbuf_queue() fuction
From: |
xcb |
Subject: |
[lwip-users] bug about pbuf_queue() fuction |
Date: |
Tue, 23 Nov 2004 15:26:29 +0800 |
lwip-users
pbuf_queue() function in pbuf.c
if ((p == NULL) || (n == NULL) ) return;
should be write to:
if ((p == NULL) || (n == NULL) || (p==n)) return;
p->next can not point to self,
for(q = p; q != NULL; q = q->next) {
acc += lwip_chksum(q->payload, q->len);
while (acc >> 16) {
acc = (acc & 0xffffUL) + (acc >> 16);
}
if (q->len % 2 != 0) {
swapped = 1 - swapped;
acc = (acc & 0x00ffUL << 8) | (acc & 0xff00UL >> 8);
}
}
if p->next point to self ,will not out of for()(up code),
if you dont insert netLine to netword card,and excute connect() function ,it
dont return forever,because of up code.
- [lwip-users] bug about pbuf_queue() fuction,
xcb <=