Browse Source

* Fix a netorder issue. From mantis #12858

git-svn-id: trunk@13507 -
marco 16 years ago
parent
commit
c97a407633
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-net/src/ssockets.pp

+ 1 - 1
packages/fcl-net/src/ssockets.pp

@@ -564,7 +564,7 @@ begin
       end;
       end;
   addr.family := AF_INET;
   addr.family := AF_INET;
   addr.port := ShortHostToNet(FPort);
   addr.port := ShortHostToNet(FPort);
-  addr.addr := a.s_addr;
+  addr.addr := HostToNet(a.s_addr);
 
 
   If  Sockets.fpConnect(ASocket, @addr, sizeof(addr))<>0 then
   If  Sockets.fpConnect(ASocket, @addr, sizeof(addr))<>0 then
     raise ESocketError.Create(seConnectFailed, [Format('%s:%d',[FHost, FPort])]);
     raise ESocketError.Create(seConnectFailed, [Format('%s:%d',[FHost, FPort])]);