lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] [lwip] sockets.c bug


From: Jani Monoses
Subject: [lwip-users] [lwip] sockets.c bug
Date: Thu, 09 Jan 2003 00:41:22 -0000

Hi

in the BSD socket implementation in lwip_recvfrom()
the line
  sock->lastoffset = buflen - copylen;
should read
  sock->lastoffset = copylen;

otherwise when the application requests a read() with len smaller than
what has been already acked by the stack the address of the next byte to
read is not adjusted correctly.

So if 1000 bytes are acked and we ready 100 bytes, on next read we'll read
from byte 900 onwards instead of 100 loosing the 800 in between.

Jani

[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]