mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-02 23:03:39 +02:00
Check if reply to monitor command is a plain response, else hex decode the response.
This commit is contained in:
parent
9c6de4853a
commit
b27172ff12
@ -847,11 +847,12 @@ var
|
|||||||
begin
|
begin
|
||||||
cmdstr := 'qRcmd,' + FHexEncodeStr(s);
|
cmdstr := 'qRcmd,' + FHexEncodeStr(s);
|
||||||
result := FSendCmdWaitForReply(cmdstr, reply);
|
result := FSendCmdWaitForReply(cmdstr, reply);
|
||||||
if Result then
|
|
||||||
begin
|
// Check if reply is not hex encoded, else decode reply
|
||||||
|
if Result and not((reply = '') or (reply = 'OK') or ((length(reply) = 3) and (reply[1] = 'E'))) then
|
||||||
reply := FHexDecodeStr(reply);
|
reply := FHexDecodeStr(reply);
|
||||||
DebugLn(DBG_RSP, ['[Monitor '+s+'] reply: ', reply]);
|
|
||||||
end;
|
DebugLn(DBG_RSP, ['[Monitor '+s+'] reply: ', reply]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRspConnection.Init: integer;
|
function TRspConnection.Init: integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user