[omniORB] suspicios code in tcpTransportImpl.cc, omniORB4
Harri Pasanen
harri.pasanen@trema.com
Thu, 28 Mar 2002 17:22:40 +0100
Following up on my own post, investigating problems on Windows NT...
Harri Pasanen wrote:
> In tcpTransportImpl.cc, function win32_get_ifinfo,
>
> line 329:
> if ( WSAIoctl(sock,SIO_ADDRESS_LIST_QUERY,
> NULL,0,
> (LPVOID)ifr,(DWORD)len,(LPDWORD)&retlen,
> NULL,NULL) == SOCKET_ERROR ) {
>
> if ( WSAGetLastError() != WSAEFAULT || lastlen != 0 ) {
> if ( omniORB::trace(1) ) {
> omniORB::logger log;
> log << "Warning: WSAIoctl SIO_ADDRESS_LIST_QUERY failed. Unable
> to
> obtain the list of all interface addresses.\n";
> return;
> }
> }
>
> Looks like only if it is doing tracing it will return at this point.
> Perhaps the return statement should be outside of the inner braces?
>
> I've been getting this:
> "omniORB: Warning: WSAIoctl SIO_ADDRESS_LIST_QUERY failed. Unable to
> obtain the list of all interface addresses." all the time on one system,
> that's how I stumbled on this one.
>
Hmm... in fact it seems to work only if tracing is enabled. Otherwise the
client, just hangs there forever.
So
nameclt list -ORBtraceLevel 0
will never return on Windows NT.
nameclt list -ORBtraceLevel 1
will first print out the warning, then function normally and exit
gracefully.
But that will not initialise ifaddrs correctly and may cause problems later?
Regards,
Harri