Browse Source

* Applied patch to "Connect" by Markus Kaemmerer: WinSock.Connect returns
zero when it succeeded, and not vice versa.

sg 25 years ago
parent
commit
6b97311fd7
1 changed files with 6 additions and 2 deletions
  1. 6 2
      rtl/win32/sockets.pp

+ 6 - 2
rtl/win32/sockets.pp

@@ -113,7 +113,7 @@ Function Connect(Sock:Longint;Var Addr;Addrlen:Longint):Boolean;
 
 begin
   Connect:=WinSock.Connect(Sock,WinSock.TSockAddr(Addr),AddrLen)=0;
-  if Connect then
+  if not Connect then
     SocketError:=WSAGetLastError
   else
     SocketError:=0;
@@ -224,7 +224,11 @@ finalization
 end.
 {
   $Log$
-  Revision 1.2  2000-07-13 11:33:58  michael
+  Revision 1.3  2000-07-28 06:34:53  sg
+  * Applied patch to "Connect" by Markus Kaemmerer: WinSock.Connect returns
+    zero when it succeeded, and not vice versa.
+
+  Revision 1.2  2000/07/13 11:33:58  michael
   + removed logs
  
 }