mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 16:49:07 +02:00
* stringfromlabel now also handles dns message compression
git-svn-id: trunk@2115 -
This commit is contained in:
parent
dd0d702bc3
commit
b99bdb88a2
@ -496,6 +496,13 @@ begin
|
|||||||
i := 0;
|
i := 0;
|
||||||
repeat
|
repeat
|
||||||
l := ord(pl[start]);
|
l := ord(pl[start]);
|
||||||
|
{ compressed reply }
|
||||||
|
while (l >= 192) do
|
||||||
|
begin
|
||||||
|
{ the -12 is because of the reply header length }
|
||||||
|
start := (l and not(192)) shl 8 + ord(pl[start+1]) - 12;
|
||||||
|
l := ord(pl[start]);
|
||||||
|
end;
|
||||||
if l <> 0 then begin
|
if l <> 0 then begin
|
||||||
setlength(result,length(result)+l);
|
setlength(result,length(result)+l);
|
||||||
move(pl[start+1],result[i+1],l);
|
move(pl[start+1],result[i+1],l);
|
||||||
|
Loading…
Reference in New Issue
Block a user