From 604d1b18aadc405fcc328837e44bb9009fd7bf4f Mon Sep 17 00:00:00 2001 From: geby Date: Wed, 30 Sep 2009 07:34:42 +0000 Subject: [PATCH] Next fixes for FPC... git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@102 7c85be65-684b-0410-a082-b2ed4fbef004 --- ssfpc.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ssfpc.pas b/ssfpc.pas index 8b36d19..072d7c7 100644 --- a/ssfpc.pas +++ b/ssfpc.pas @@ -523,7 +523,7 @@ end; function Connect(s: TSocket; const name: TVarSin): Integer; begin - if fpConnect(s, @name, SizeOfVarSin(name)) then + if fpConnect(s, @name, SizeOfVarSin(name)) = 0 then Result := 0 else Result := SOCKET_ERROR; @@ -535,7 +535,7 @@ var begin len := SizeOf(name); FillChar(name, len, 0); - Result := fpGetSocketName(s, @name, @Len); + Result := fpGetSockName(s, @name, @Len); end; function GetPeerName(s: TSocket; var name: TVarSin): Integer; @@ -572,7 +572,7 @@ var x: integer; begin x := SizeOf(from); - Result := sockets.RecvFrom(s, pointer(Buf), len, flags, @from, @x); + Result := fpRecvFrom(s, pointer(Buf), len, flags, @from, @x); end; function Accept(s: TSocket; var addr: TVarSin): TSocket; @@ -612,7 +612,7 @@ end; function Listen(s: TSocket; backlog: Integer): Integer; begin - if fpListen(s, backlog) then + if fpListen(s, backlog) = 0 then Result := 0 else Result := SOCKET_ERROR;