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