[omniORB] omniORB3.0.0 - win32 tcp socket bug (important)

Sai-Lai Lo S.Lo@uk.research.att.com
Mon, 7 Aug 2000 11:42:39 +0100


Our recent setup to do regression testing on fresh builds every night across
multiple platforms has paid off and revealed a bug that only affects
win32 platforms.

The connect code in 3.0.0 turns the socket to non-blocking and set a
limit on the time it prepares to wait. Once connected, the socket is
turned back to blocking. Unfortunately, the ioctlsocket call is passed the
wrong argument which leaves the socket in non-blocking state. The end
result is that for CORBA calls with large arguments, the call may fail
mysteriously (because windows says the send call would block and the ORB
thinks it is wrong because it thinks the socket is blocking).

The fix is simple and has been checkin.

Index: tcpSocketMTfactory.cc
===================================================================
RCS file: /project/omni/cvsroot/omni/src/lib/omniORB2/orbcore/tcpSocketMTfactory.cc,v
retrieving revision 1.22.6.14
diff -c -r1.22.6.14 tcpSocketMTfactory.cc
*** tcpSocketMTfactory.cc	2000/07/03 15:38:20	1.22.6.14
--- tcpSocketMTfactory.cc	2000/08/07 10:21:23
***************
*** 1297,1302 ****
--- 1297,1303 ----
      return RC_INVALID_SOCKET;
    }
  # else
+   v = 0;
    if (ioctlsocket(sock,FIONBIO,&v) == RC_SOCKET_ERROR) {
      CLOSESOCKET(sock);
      return RC_INVALID_SOCKET;


I suggest all win32 users apply this patch ASAP. 


Regards,

Sai-Lai

-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 1223 343000
Cambridge CB2 1QA                     Fax:   +44 1223 313542
ENGLAND