diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-13 22:16:07 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-13 22:16:07 +0000 |
commit | b15122b316022d7e052092875c91ec188ec07a0c (patch) | |
tree | 501b2b81c9567c9b5163d46f3275fd733786c06c /ace/ACE.cpp | |
parent | 8e5dee564c4b134d2bb4d1121dbd3b63afabb0ef (diff) | |
download | ATCD-b15122b316022d7e052092875c91ec188ec07a0c.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/ACE.cpp')
-rw-r--r-- | ace/ACE.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 5bc9dd8d171..768d1af65e5 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -1551,9 +1551,6 @@ ACE::bind_port (ACE_HANDLE handle, ACE_TRACE ("ACE::bind_port"); sockaddr_in sin; - static u_short upper_limit = ACE_MAX_DEFAULT_PORT; - int lower_limit = IPPORT_RESERVED; - int round_trip = upper_limit; ACE_OS::memset ((void *) &sin, 0, sizeof sin); sin.sin_family = AF_INET; @@ -1562,11 +1559,15 @@ ACE::bind_port (ACE_HANDLE handle, #endif /* ACE_HAS_SIN_LEN */ sin.sin_addr.s_addr = ip_addr; -#if defined (ACE_HAS_WILDCARD_BIND) +#if !defined (ACE_LACKS_WILDCARD_BIND) // The OS kernel should select a free port for us. sin.sin_port = 0; return ACE_OS::bind (handle, (sockaddr *) &sin, sizeof sin); #else + static u_short upper_limit = ACE_MAX_DEFAULT_PORT; + int round_trip = upper_limit; + int lower_limit = IPPORT_RESERVED; + // We have to select the port explicitly. for (;;) |