Updates file transfers
This commit is contained in:
parent
3eff7e378d
commit
5a474aacfa
@ -108,6 +108,13 @@ int wcrx(void)
|
|||||||
sendline(sendchar); /* send it now, we're ready! */
|
sendline(sendchar); /* send it now, we're ready! */
|
||||||
ioctl(1, TCFLSH, 0);
|
ioctl(1, TCFLSH, 0);
|
||||||
purgeline(0); /* Do read next time ... */
|
purgeline(0); /* Do read next time ... */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keep connections alive
|
||||||
|
*/
|
||||||
|
Nopper();
|
||||||
|
alarm_on();
|
||||||
|
|
||||||
sectcurr = wcgetsec(&Blklen, secbuf, (unsigned int) ((sectnum & 0177) ? 5 : 13));
|
sectcurr = wcgetsec(&Blklen, secbuf, (unsigned int) ((sectnum & 0177) ? 5 : 13));
|
||||||
Syslog('x', "%s: got sector %d", protname(), sectcurr);
|
Syslog('x', "%s: got sector %d", protname(), sectcurr);
|
||||||
|
|
||||||
|
@ -331,6 +331,12 @@ static int wctx(long bytes_total)
|
|||||||
if (wcputsec(txbuf, ++sectnum, thisblklen) == TERROR)
|
if (wcputsec(txbuf, ++sectnum, thisblklen) == TERROR)
|
||||||
return TERROR;
|
return TERROR;
|
||||||
bytes_sent += thisblklen;
|
bytes_sent += thisblklen;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keep connections alive
|
||||||
|
*/
|
||||||
|
Nopper();
|
||||||
|
alarm_on();
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(input_f);
|
fclose(input_f);
|
||||||
@ -339,7 +345,8 @@ static int wctx(long bytes_total)
|
|||||||
do {
|
do {
|
||||||
purgeline(5);
|
purgeline(5);
|
||||||
PUTCHAR(EOT);
|
PUTCHAR(EOT);
|
||||||
fflush(stdout);
|
ioctl(1, TCFLSH, 0);
|
||||||
|
// fflush(stdout);
|
||||||
++attempts;
|
++attempts;
|
||||||
} while ((firstch = (GETCHAR(Rxtimeout)) != ACK) && attempts < RETRYMAX);
|
} while ((firstch = (GETCHAR(Rxtimeout)) != ACK) && attempts < RETRYMAX);
|
||||||
if (attempts == RETRYMAX) {
|
if (attempts == RETRYMAX) {
|
||||||
@ -383,7 +390,8 @@ static int wcputsec(char *buf, int sectnum, size_t cseclen)
|
|||||||
else
|
else
|
||||||
sendline(Checksum);
|
sendline(Checksum);
|
||||||
|
|
||||||
fflush(stdout);
|
ioctl(1, TCFLSH, 0);
|
||||||
|
// fflush(stdout);
|
||||||
if (Optiong) {
|
if (Optiong) {
|
||||||
firstsec = FALSE;
|
firstsec = FALSE;
|
||||||
return OK;
|
return OK;
|
||||||
|
@ -75,7 +75,7 @@ extern unsigned long rcvdbytes;
|
|||||||
extern int zmodem_requested;
|
extern int zmodem_requested;
|
||||||
|
|
||||||
|
|
||||||
int zmrcvfiles(void)
|
int zmrcvfiles(int want1k)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ int zmrcvfiles(void)
|
|||||||
* Ymodem or Xmodem receive loop
|
* Ymodem or Xmodem receive loop
|
||||||
*/
|
*/
|
||||||
rxbytes = 0l;
|
rxbytes = 0l;
|
||||||
if (wcrxpn(secbuf) == TERROR) {
|
if (wcrxpn(secbuf, want1k) == TERROR) {
|
||||||
rc = 2;
|
rc = 2;
|
||||||
goto fubar;
|
goto fubar;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
int zmrcvfiles(void);
|
int zmrcvfiles(int);
|
||||||
int putsec(char*,int);
|
int putsec(char*,int);
|
||||||
int closeit(int);
|
int closeit(int);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user