Small changes (by Pepak)
git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@225 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
parent
9c92358b29
commit
2efcf47e8a
@ -427,7 +427,7 @@ begin
|
|||||||
IcmpEchoHeaderPtr := @FBuffer[IpHdrLen + 1];
|
IcmpEchoHeaderPtr := @FBuffer[IpHdrLen + 1];
|
||||||
end;
|
end;
|
||||||
//check for timeout
|
//check for timeout
|
||||||
if TickDelta(x, GetTick) > FTimeout then
|
if TickDelta(x, GetTick) > Cardinal(FTimeout) then
|
||||||
begin
|
begin
|
||||||
t := false;
|
t := false;
|
||||||
Break;
|
Break;
|
||||||
@ -484,7 +484,6 @@ var
|
|||||||
ip6: TSockAddrIn6;
|
ip6: TSockAddrIn6;
|
||||||
x: integer;
|
x: integer;
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
s := StringOfChar(#0, SizeOf(TICMP6Packet)) + Value;
|
s := StringOfChar(#0, SizeOf(TICMP6Packet)) + Value;
|
||||||
ICMP6Ptr := Pointer(s);
|
ICMP6Ptr := Pointer(s);
|
||||||
@ -499,6 +498,8 @@ begin
|
|||||||
ICMP6Ptr^.Length := synsock.htonl(Length(Value));
|
ICMP6Ptr^.Length := synsock.htonl(Length(Value));
|
||||||
ICMP6Ptr^.proto := IPPROTO_ICMPV6;
|
ICMP6Ptr^.proto := IPPROTO_ICMPV6;
|
||||||
Result := Checksum(s);
|
Result := Checksum(s);
|
||||||
|
{$ELSE}
|
||||||
|
Result := 0;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ Supported Privacy encryptions: DES, 3DES, AES
|
|||||||
{$IFDEF UNICODE}
|
{$IFDEF UNICODE}
|
||||||
{$WARN IMPLICIT_STRING_CAST OFF}
|
{$WARN IMPLICIT_STRING_CAST OFF}
|
||||||
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
|
||||||
|
{$TYPEINFO ON}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
unit snmpsend;
|
unit snmpsend;
|
||||||
@ -1000,7 +1001,6 @@ function TSNMPSend.SendRequest: Boolean;
|
|||||||
var
|
var
|
||||||
sync: TV3Sync;
|
sync: TV3Sync;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
if FQuery.FVersion = 3 then
|
if FQuery.FVersion = 3 then
|
||||||
begin
|
begin
|
||||||
sync := GetV3Sync;
|
sync := GetV3Sync;
|
||||||
|
@ -1989,7 +1989,6 @@ var
|
|||||||
Size: integer;
|
Size: integer;
|
||||||
KC, ROUNDS, j, r, t, rconpointer: longword;
|
KC, ROUNDS, j, r, t, rconpointer: longword;
|
||||||
tk: array[0..MAXKC-1,0..3] of byte;
|
tk: array[0..MAXKC-1,0..3] of byte;
|
||||||
n: integer;
|
|
||||||
begin
|
begin
|
||||||
FillChar(tk,Sizeof(tk),0);
|
FillChar(tk,Sizeof(tk),0);
|
||||||
//key must have at least 128 bits and max 256 bits
|
//key must have at least 128 bits and max 256 bits
|
||||||
|
21
synautil.pas
21
synautil.pas
@ -85,6 +85,9 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF CIL}
|
{$IFDEF CIL}
|
||||||
System.IO,
|
System.IO,
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF DELPHIX_SEATTLE_UP}
|
||||||
|
AnsiStrings,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
SysUtils, Classes, SynaFpc;
|
SysUtils, Classes, SynaFpc;
|
||||||
|
|
||||||
@ -1843,7 +1846,7 @@ begin
|
|||||||
if Dir = '' then
|
if Dir = '' then
|
||||||
begin
|
begin
|
||||||
Path := StringOfChar(#0, MAX_PATH);
|
Path := StringOfChar(#0, MAX_PATH);
|
||||||
x := GetTempPath(Length(Path), PChar(Path));
|
{x :=} GetTempPath(Length(Path), PChar(Path));
|
||||||
Path := PChar(Path);
|
Path := PChar(Path);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -2021,12 +2024,12 @@ begin
|
|||||||
// Moving Aptr position forward until boundary will be reached
|
// Moving Aptr position forward until boundary will be reached
|
||||||
while (APtr<AEtx) do
|
while (APtr<AEtx) do
|
||||||
begin
|
begin
|
||||||
if strlcomp(APtr,#13#10'--',4)=0 then
|
if {$IFDEF DELPHIX_SEATTLE_UP} AnsiStrings. {$ENDIF} strlcomp(APtr,#13#10'--',4)=0 then
|
||||||
begin
|
begin
|
||||||
eob := MatchBoundary(APtr,AEtx,ABoundary);
|
eob := MatchBoundary(APtr,AEtx,ABoundary);
|
||||||
Step := 4;
|
Step := 4;
|
||||||
end
|
end
|
||||||
else if strlcomp(APtr,'--',2)=0 then
|
else if {$IFDEF DELPHIX_SEATTLE_UP} AnsiStrings. {$ENDIF} strlcomp(APtr,'--',2)=0 then
|
||||||
begin
|
begin
|
||||||
eob := MatchBoundary(APtr,AEtx,ABoundary);
|
eob := MatchBoundary(APtr,AEtx,ABoundary);
|
||||||
Step := 2;
|
Step := 2;
|
||||||
@ -2059,17 +2062,17 @@ begin
|
|||||||
Lng := length(ABoundary);
|
Lng := length(ABoundary);
|
||||||
if (MatchPos+2+Lng)>AETX then
|
if (MatchPos+2+Lng)>AETX then
|
||||||
exit;
|
exit;
|
||||||
if strlcomp(MatchPos,#13#10,2)=0 then
|
if {$IFDEF DELPHIX_SEATTLE_UP} AnsiStrings. {$ENDIF} strlcomp(MatchPos,#13#10,2)=0 then
|
||||||
inc(MatchPos,2);
|
inc(MatchPos,2);
|
||||||
if (MatchPos+2+Lng)>AETX then
|
if (MatchPos+2+Lng)>AETX then
|
||||||
exit;
|
exit;
|
||||||
if strlcomp(MatchPos,'--',2)<>0 then
|
if {$IFDEF DELPHIX_SEATTLE_UP} AnsiStrings. {$ENDIF} strlcomp(MatchPos,'--',2)<>0 then
|
||||||
exit;
|
exit;
|
||||||
inc(MatchPos,2);
|
inc(MatchPos,2);
|
||||||
if strlcomp(MatchPos,PANSIChar(ABoundary),Lng)<>0 then
|
if {$IFDEF DELPHIX_SEATTLE_UP} AnsiStrings. {$ENDIF} strlcomp(MatchPos,PANSIChar(ABoundary),Lng)<>0 then
|
||||||
exit;
|
exit;
|
||||||
inc(MatchPos,Lng);
|
inc(MatchPos,Lng);
|
||||||
if ((MatchPos+2)<=AEtx) and (strlcomp(MatchPos,#13#10,2)=0) then
|
if ((MatchPos+2)<=AEtx) and ({$IFDEF DELPHIX_SEATTLE_UP} AnsiStrings. {$ENDIF} strlcomp(MatchPos,#13#10,2)=0) then
|
||||||
inc(MatchPos,2);
|
inc(MatchPos,2);
|
||||||
Result := MatchPos;
|
Result := MatchPos;
|
||||||
end;
|
end;
|
||||||
@ -2084,10 +2087,10 @@ begin
|
|||||||
MatchPos := MatchBoundary(ABOL,AETX,ABoundary);
|
MatchPos := MatchBoundary(ABOL,AETX,ABoundary);
|
||||||
if not Assigned(MatchPos) then
|
if not Assigned(MatchPos) then
|
||||||
exit;
|
exit;
|
||||||
if strlcomp(MatchPos,'--',2)<>0 then
|
if {$IFDEF DELPHIX_SEATTLE_UP} AnsiStrings. {$ENDIF} strlcomp(MatchPos,'--',2)<>0 then
|
||||||
exit;
|
exit;
|
||||||
inc(MatchPos,2);
|
inc(MatchPos,2);
|
||||||
if (MatchPos+2<=AEtx) and (strlcomp(MatchPos,#13#10,2)=0) then
|
if (MatchPos+2<=AEtx) and ({$IFDEF DELPHIX_SEATTLE_UP} AnsiStrings. {$ENDIF} strlcomp(MatchPos,#13#10,2)=0) then
|
||||||
inc(MatchPos,2);
|
inc(MatchPos,2);
|
||||||
Result := MatchPos;
|
Result := MatchPos;
|
||||||
end;
|
end;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user