More debug logging

This commit is contained in:
mysticbbs 2012-08-17 17:21:59 -04:00
parent 2265a39c55
commit 4e2fcf4584
1 changed files with 15 additions and 2 deletions

View File

@ -3,6 +3,7 @@ Unit m_Protocol_Zmodem;
{$I M_OPS.PAS} {$I M_OPS.PAS}
{.$DEFINE ZDEBUG} {.$DEFINE ZDEBUG}
{.$DEFINE ZCHARLOG}
Interface Interface
@ -271,6 +272,8 @@ Begin
XON, XON,
XOFF : Continue; XOFF : Continue;
Else Else
{$IFDEF ZCHARLOG} Zlog('ZGetByte -> ' + strI2S(Result)); {$ENDIF}
Exit; Exit;
End; End;
End; End;
@ -282,7 +285,10 @@ Function TProtocolZmodem.ZDLRead : SmallInt;
Begin Begin
Result := ReadByteTimeOut(RxTimeOut); Result := ReadByteTimeOut(RxTimeOut);
If Result <> ZDLE Then Exit; If Result <> ZDLE Then Begin
{$IFDEF ZCHARLOG} ZLog('ZDLRead -> Did not get ZDLE: ' + strI2S(Result)); {$ENDIF}
Exit;
End;
Result := ReadByteTimeOut(RxTimeOut); Result := ReadByteTimeOut(RxTimeOut);
@ -311,6 +317,8 @@ Begin
{$IFDEF ZDEBUG} ZLog('ZDLRead -> Got ZERROR'); {$ENDIF} {$IFDEF ZDEBUG} ZLog('ZDLRead -> Got ZERROR'); {$ENDIF}
End; End;
End; End;
{$IFDEF ZCHARLOG} ZLog('ZDLRead -> ' + strI2S(Result)); {$ENDIF}
End; End;
(* (*
@ -1283,6 +1291,7 @@ Again:
End; End;
RCDO, RCDO,
ZCAN : Begin ZCAN : Begin
{$IFDEF ZDEBUG} ZLog('ZInitSender -> Got RCDO/ZCAN'); {$ENDIF}
ZInitSender := ZERROR; ZInitSender := ZERROR;
Exit; Exit;
End; End;
@ -1722,6 +1731,8 @@ Procedure TProtocolZmodem.DoAbortSequence;
Begin Begin
If Not Connected Then Exit; If Not Connected Then Exit;
{$IFDEF ZDEBUG} ZLog('DoAbortSequence -> begin'); {$ENDIF}
Client.PurgeInputData; Client.PurgeInputData;
Client.PurgeOutputData; Client.PurgeOutputData;
@ -1747,7 +1758,9 @@ Begin
If AbortTransfer Then DoAbortSequence; If AbortTransfer Then DoAbortSequence;
StatusUpdate(False, True); {$IFDEF ZDEBUG} Zlog('QueueReceive -> Final status update'); {$ENDIF}
// StatusUpdate(False, True);
End; End;
Procedure TProtocolZmodem.QueueSend; Procedure TProtocolZmodem.QueueSend;