lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
windows: fix that an immediate connect error is not seen and the socket is stuck...
[lcore.git]
/
binipstuff.pas
diff --git
a/binipstuff.pas
b/binipstuff.pas
index 227c6f4965d99af2966c9fb50644a4f91c9e8363..1d7a7c23c74fbfeef33d2ee4f091fe256f03a905 100644
(file)
--- a/
binipstuff.pas
+++ b/
binipstuff.pas
@@
-78,8
+78,8
@@
type
Adding "4" to non IPv6 record names improves code clarity }
\r
\r
{$ifndef mswindows}
\r
Adding "4" to non IPv6 record names improves code clarity }
\r
\r
{$ifndef mswindows}
\r
-
{
zipplet 20170204: Do we still need to support ver1_0? Perhaps a cleanup is in order.
\r
- For now keep supporting it for compatibility. }
\r
+
//
zipplet 20170204: Do we still need to support ver1_0? Perhaps a cleanup is in order.
\r
+ //For now keep supporting it for compatibility.
\r
{$ifdef ver1_0}
\r
cuint16 = word;
\r
cuint32 = dword;
\r
{$ifdef ver1_0}
\r
cuint16 = word;
\r
cuint32 = dword;
\r
@@
-91,7
+91,7
@@
type
family:Word;
\r
port :Word;
\r
addr :uint32;
\r
family:Word;
\r
port :Word;
\r
addr :uint32;
\r
- pad :array [0..7] of byte;
{zipplet 20170204 - originally this was 1..8 for some reason}
\r
+ pad :array [0..7] of byte;
//zipplet 20170204 - originally this was 1..8 for some reason
\r
end;
\r
\r
{$ifdef ipv6}
\r
end;
\r
\r
{$ifdef ipv6}
\r
@@
-104,7
+104,7
@@
type
end;
\r
{$endif}
\r
\r
end;
\r
{$endif}
\r
\r
- {zipplet 20170204: I did not rename the unioned record. We might want to rename this to TLinetSockAddrv }
\r
+ //zipplet 20170204: I did not rename the unioned record. We might want to rename this to TLinetSockAddrv
\r
TinetSockAddrv = packed record
\r
case integer of
\r
0: (InAddr:TLInetSockAddr4);
\r
TinetSockAddrv = packed record
\r
case integer of
\r
0: (InAddr:TLInetSockAddr4);
\r
@@
-300,7
+300,10
@@
begin
{$endif}
\r
\r
{try v4}
\r
{$endif}
\r
\r
{try v4}
\r
- binip.ip := htonl(longip(s));
\r
+ // zipplet: htonl() expects a uint32 but longip() spits out longint.
\r
+ // Because longip() is deprecated, we do not fix it but typecast.
\r
+ //binip.ip := htonl(longip(s));
\r
+ binip.ip := htonl(uint32(longip(s)));
\r
if (binip.ip <> 0) or (s = '0.0.0.0') then begin
\r
result := true;
\r
binip.family := AF_INET;
\r
if (binip.ip <> 0) or (s = '0.0.0.0') then begin
\r
result := true;
\r
binip.family := AF_INET;
\r