mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 09:34:12 +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,6 +95,7 @@ begin
|
|||||||
SendStr:='';
|
SendStr:='';
|
||||||
end else begin
|
end else begin
|
||||||
SendStr:=SendStr + c;
|
SendStr:=SendStr + c;
|
||||||
|
if not FCon.OptionIsSet(TS_ECHO) then
|
||||||
Write(c);
|
Write(c);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -45,7 +45,7 @@ type
|
|||||||
constructor Create;
|
constructor Create;
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
procedure Push(const Value: Char);
|
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 Items[i: Byte]: Char read GetItem write SetItem; default;
|
||||||
property Full: Boolean read GetFull;
|
property Full: Boolean read GetFull;
|
||||||
property OnFull: TLOnFull read FOnFull write FOnFull;
|
property OnFull: TLOnFull read FOnFull write FOnFull;
|
||||||
@ -90,12 +90,11 @@ end;
|
|||||||
|
|
||||||
procedure TLControlStack.Push(const Value: Char);
|
procedure TLControlStack.Push(const Value: Char);
|
||||||
begin
|
begin
|
||||||
if FIndex < TL_CSLENGTH then
|
if FIndex < TL_CSLENGTH then begin
|
||||||
begin
|
|
||||||
FItems[FIndex]:=Value;
|
FItems[FIndex]:=Value;
|
||||||
Inc(FIndex);
|
Inc(FIndex);
|
||||||
if Full then
|
if Full and Assigned(FOnFull) then
|
||||||
if Assigned(FOnFull) then FOnFull;
|
FOnFull;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -245,11 +245,14 @@ procedure TLTelnet.TelnetParse(const msg: string);
|
|||||||
var
|
var
|
||||||
i: Longint;
|
i: Longint;
|
||||||
begin
|
begin
|
||||||
if Length(msg) > 0 then
|
|
||||||
for i:=1 to Length(msg) do
|
for i:=1 to Length(msg) do
|
||||||
if (FStack.Index > 0) or (msg[i] = TS_IAC) then
|
if (FStack.ItemIndex > 0) or (msg[i] = TS_IAC) then begin
|
||||||
|
if msg[i] = TS_GA then
|
||||||
|
FStack.Clear
|
||||||
|
else
|
||||||
FStack.Push(msg[i])
|
FStack.Push(msg[i])
|
||||||
else FOutput.WriteByte(Byte(msg[i]));
|
end else
|
||||||
|
FOutput.WriteByte(Byte(msg[i]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLTelnet.OptionIsSet(const Option: Char): Boolean;
|
function TLTelnet.OptionIsSet(const Option: Char): Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user