debug zedzap
This commit is contained in:
parent
3e9e152054
commit
6eac20718a
@ -210,10 +210,10 @@ int tx_zmodem(s_protinfo *pi, bool caller)
|
|||||||
|
|
||||||
case ZTX_NEXTFILE:
|
case ZTX_NEXTFILE:
|
||||||
DEB((D_PROT, "tx_zmodem: entering state ZTX_NEXTFILE"));
|
DEB((D_PROT, "tx_zmodem: entering state ZTX_NEXTFILE"));
|
||||||
if( pi->send && pi->send->fp )
|
if (pi->send) p_tx_fclose(pi);
|
||||||
p_tx_fclose(pi);
|
|
||||||
txtries = 0;
|
txtries = 0;
|
||||||
txstate = p_tx_fopen(pi, NULL) ? ZTX_FIN : ZTX_FINFO;
|
txstate = p_tx_fopen(pi, NULL) ? ZTX_FIN : ZTX_FINFO;
|
||||||
|
log("nextfile next state: %d", txstate);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ZTX_FINFO:
|
case ZTX_FINFO:
|
||||||
@ -556,7 +556,7 @@ int tx_zmodem(s_protinfo *pi, bool caller)
|
|||||||
case ZFIN:
|
case ZFIN:
|
||||||
/* BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG! */
|
/* BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG! */
|
||||||
/* BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG! */
|
/* BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG! */
|
||||||
/* BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG! */
|
log(" BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG!BUG! ");
|
||||||
if( txstate == ZTX_FINACK )
|
if( txstate == ZTX_FINACK )
|
||||||
{
|
{
|
||||||
if( PUTSTR("OO") == 0 )
|
if( PUTSTR("OO") == 0 )
|
||||||
@ -590,7 +590,7 @@ int tx_zmodem(s_protinfo *pi, bool caller)
|
|||||||
|
|
||||||
/* Check pos */
|
/* Check pos */
|
||||||
if( (Z_Rxpos || txstate != ZTX_FINFOACK)
|
if( (Z_Rxpos || txstate != ZTX_FINFOACK)
|
||||||
&& fseek(pi->send->fp, Z_Rxpos, 0) )
|
&& p_tx_rewind(pi, Z_Rxpos) )
|
||||||
{
|
{
|
||||||
logerr("can't send file from requested position");
|
logerr("can't send file from requested position");
|
||||||
/* Open next file for send */
|
/* Open next file for send */
|
||||||
@ -641,7 +641,7 @@ int tx_zmodem(s_protinfo *pi, bool caller)
|
|||||||
case ZCRC:
|
case ZCRC:
|
||||||
if( txstate == ZTX_FINFOACK )
|
if( txstate == ZTX_FINFOACK )
|
||||||
{
|
{
|
||||||
/* Send file's CRC-32 */
|
log(" Send file's CRC-32 ");
|
||||||
crc32 = 0xFFFFFFFFL;
|
crc32 = 0xFFFFFFFFL;
|
||||||
|
|
||||||
while( ((c = getc(pi->send->fp)) != EOF) && --Z_Rxpos )
|
while( ((c = getc(pi->send->fp)) != EOF) && --Z_Rxpos )
|
||||||
@ -717,8 +717,7 @@ exit:
|
|||||||
|
|
||||||
setalarm(0);
|
setalarm(0);
|
||||||
|
|
||||||
if( pi->send && pi->send->fp )
|
if (pi->send) p_tx_fclose(pi);
|
||||||
p_tx_fclose(pi);
|
|
||||||
|
|
||||||
if( txbuf )
|
if( txbuf )
|
||||||
free(txbuf);
|
free(txbuf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user