Exported from Bugzilla, issue 3628.
--- Comment added on 8/6/02 4:20:05 PM ---
From Markus Kaemmerer changes, method TIpCustomNNTPClient.DoReadLine:
case FState of
nsConnect :
begin {!!.MK}
FPostingAllowed := FResponseCode = '200';
// Handle 400 Too Many Connections {!!.MK}
// ToDo: define error event or something like this
if Copy(Line, 1, Pos(' ', Line) - 1) = '400' then {!!.MK}
FState := nsNoOp; {!!.MK}
end; {!!.MK}
The gist of this is that if an error occurs then we should raise an event and
put the state engine into an idle state.
--- Comment added on 8/6/02 4:21:40 PM ---
Another situation where error codes need to be checked is for state nsAuthPass
within the same method. Changes from Markus:
nsAuthPass : begin
case FTask of
ntAuthenticate : DoTaskComplete;
ntNoTask : SetState(nsNoOp); {!!.03}
else
// check for "502 Authentication failed" {!!.MK}
if fResponseCode <> '502' then {!!.MK}
SelectGroup(FPendGroup); {!!.MK}
end;
end;