getsockname fixes. getXaddr was returning peer addr
[lcore.git] / unixstuff.inc
index f5de6d4056b20c14e80d58b2c7c0dbde543f5958..0eb9b3d82d29b9ba7a6a33251cd9da5205716f1b 100755 (executable)
@@ -81,7 +81,7 @@
         end;\r
         function GetSocketName(Sock: LongInt; var Addr;var Addrlen: LongInt):LongInt;\r
         begin\r
-          result := fpgetpeername(sock,@addr,@addrlen);\r
+          result := fpgetsockname(sock,@addr,@addrlen);\r
         end;\r
         function Accept(Sock: LongInt; var Addr; var Addrlen: LongInt):LongInt;\r
         begin\r