[omniORB] suspicios code in tcpTransportImpl.cc, omniORB4

Harri Pasanen harri.pasanen@trema.com
Thu, 28 Mar 2002 16:26:18 +0100


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.

Regards,

Harri