* net.cc (cygwin_bindresvport_sa): Fix usage of last_used_bindresvport.
This commit is contained in:
parent
6b9b8ecd85
commit
7b3e3bfd49
@ -1,3 +1,7 @@
|
|||||||
|
2008-06-24 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* net.cc (cygwin_bindresvport_sa): Fix usage of last_used_bindresvport.
|
||||||
|
|
||||||
2008-06-21 Corinna Vinschen <corinna@vinschen.de>
|
2008-06-21 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* include/limits.h (PATH_MAX): Add comment.
|
* include/limits.h (PATH_MAX): Add comment.
|
||||||
|
@ -2219,9 +2219,9 @@ cygwin_bindresvport_sa (int fd, struct sockaddr *sa)
|
|||||||
|
|
||||||
for (int i = 0; i < NUM_PORTS; i++)
|
for (int i = 0; i < NUM_PORTS; i++)
|
||||||
{
|
{
|
||||||
while ((myport = InterlockedExchange (&cygwin_shared->last_used_bindresvport, 0)) == 0)
|
while ((myport = InterlockedExchange (&cygwin_shared->last_used_bindresvport, -1)) == -1)
|
||||||
low_priority_sleep (0);
|
low_priority_sleep (0);
|
||||||
if (--myport < PORT_LOW)
|
if (myport == 0 || --myport < PORT_LOW)
|
||||||
myport = PORT_HIGH;
|
myport = PORT_HIGH;
|
||||||
InterlockedExchange (&cygwin_shared->last_used_bindresvport, myport);
|
InterlockedExchange (&cygwin_shared->last_used_bindresvport, myport);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user