git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21991 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2005-11-11 15:06:07 +00:00
parent a2f9eb78a9
commit 045a032712
2 changed files with 26 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2005-11-11 Richard Frith-Macdonald <rfm@gnu.org>
* Applied Willem Rein Oudshoorn's fix for bug #11055, having tested it
and found it OK on windows-xp as well as the windows-2003 system he
was using.
2005-11-11 Richard Frith-Macdonald <rfm@gnu.org> 2005-11-11 Richard Frith-Macdonald <rfm@gnu.org>
* Source/win32/NSMessagePortNameServerWin32.m: fix port lookup in case * Source/win32/NSMessagePortNameServerWin32.m: fix port lookup in case

View file

@ -2791,14 +2791,27 @@ handle_request(int desc)
memset(&sa, '\0', sizeof(sa)); memset(&sa, '\0', sizeof(sa));
sa.sin_family = AF_INET; sa.sin_family = AF_INET;
/* FIXME: This must not be INADDR_ANY on Win,
otherwise the system will try to bind on any of #if defined(__MINGW32__)
the local addresses (including 127.0.0.1), which /* COMMENT: (3 Nov 2004 by Wim Oudshoorn):
works. - bjoern */ The comment below might be true. But
#ifdef __MINGW32__ using addr[0].s_addr has on windows 2003 server
sa.sin_addr.s_addr = addr[0].s_addr; (and some other versions of windows.)
#else exactly the same sympton as it tries to avoid.
The funny thing is that the original line, just
using INADDR_ANY seems to work on windows.
However, I assume the FIXME below was put there
for a reason. But for now I just revert it because
the platform independent code seems to work.
*/
/* FIXME: This must not be INADDR_ANY on Win,
otherwise the system will try to bind on any of
the local addresses (including 127.0.0.1), which
works. - bjoern */
/* sa.sin_addr.s_addr = addr[0].s_addr; */
sa.sin_addr.s_addr = htonl(INADDR_ANY); sa.sin_addr.s_addr = htonl(INADDR_ANY);
#else
sa.sin_addr.s_addr = htonl(INADDR_ANY);
#endif /* __MINGW32__ */ #endif /* __MINGW32__ */
sa.sin_port = htons(p); sa.sin_port = htons(p);
result = bind(sock, (void*)&sa, sizeof(sa)); result = bind(sock, (void*)&sa, sizeof(sa));