bug-hurd
[Top][All Lists]
Advanced

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

Re: [GSoC 2017] Number fo sockets


From: Kalle Olavi Niemitalo
Subject: Re: [GSoC 2017] Number fo sockets
Date: Sun, 13 Aug 2017 15:03:13 +0300
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.51 (gnu/linux)

The handling of LWIP_SOCKET_OFFSET looks inconsistent.
Suppose LWIP_SOCKET_OFFSET is 100 and LWIP_SOCKET_OPEN_COUNT is
defined.  The first alloc_socket call sets newsock->count = 100
and returns 100.  However, if get_socket(100) is then called,
it first subtracts LWIP_SOCKET_OFFSET from s, resulting in 0,
and then compares sock->count to 0; won't match.

I guess this mismatch does not harm the Hurd if you define
LWIP_SOCKET_OFFSET as 0 there, but I'd like to see it fixed
anyway.



reply via email to

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