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