mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:29:26 +02:00
* fixes some telnet issues with TS_GA (go ahead) command
git-svn-id: trunk@5293 -
This commit is contained in:
parent
25fb2bab81
commit
80d964067a
@ -95,7 +95,8 @@ begin
|
||||
SendStr:='';
|
||||
end else begin
|
||||
SendStr:=SendStr + c;
|
||||
Write(c);
|
||||
if not FCon.OptionIsSet(TS_ECHO) then
|
||||
Write(c);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -45,7 +45,7 @@ type
|
||||
constructor Create;
|
||||
procedure Clear;
|
||||
procedure Push(const Value: Char);
|
||||
property Index: Byte read FIndex;
|
||||
property ItemIndex: Byte read FIndex;
|
||||
property Items[i: Byte]: Char read GetItem write SetItem; default;
|
||||
property Full: Boolean read GetFull;
|
||||
property OnFull: TLOnFull read FOnFull write FOnFull;
|
||||
@ -90,13 +90,12 @@ end;
|
||||
|
||||
procedure TLControlStack.Push(const Value: Char);
|
||||
begin
|
||||
if FIndex < TL_CSLENGTH then
|
||||
begin
|
||||
FItems[FIndex]:=Value;
|
||||
Inc(FIndex);
|
||||
if Full then
|
||||
if Assigned(FOnFull) then FOnFull;
|
||||
end;
|
||||
if FIndex < TL_CSLENGTH then begin
|
||||
FItems[FIndex]:=Value;
|
||||
Inc(FIndex);
|
||||
if Full and Assigned(FOnFull) then
|
||||
FOnFull;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -245,11 +245,14 @@ procedure TLTelnet.TelnetParse(const msg: string);
|
||||
var
|
||||
i: Longint;
|
||||
begin
|
||||
if Length(msg) > 0 then
|
||||
for i:=1 to Length(msg) do
|
||||
if (FStack.Index > 0) or (msg[i] = TS_IAC) then
|
||||
for i:=1 to Length(msg) do
|
||||
if (FStack.ItemIndex > 0) or (msg[i] = TS_IAC) then begin
|
||||
if msg[i] = TS_GA then
|
||||
FStack.Clear
|
||||
else
|
||||
FStack.Push(msg[i])
|
||||
else FOutput.WriteByte(Byte(msg[i]));
|
||||
end else
|
||||
FOutput.WriteByte(Byte(msg[i]));
|
||||
end;
|
||||
|
||||
function TLTelnet.OptionIsSet(const Option: Char): Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user