diff --git a/mbsebbs/ymrecv.c b/mbsebbs/ymrecv.c index d5265d51..4c07e31e 100644 --- a/mbsebbs/ymrecv.c +++ b/mbsebbs/ymrecv.c @@ -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); diff --git a/mbsebbs/ymsend.c b/mbsebbs/ymsend.c index d98398d0..47d2308c 100644 --- a/mbsebbs/ymsend.c +++ b/mbsebbs/ymsend.c @@ -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; diff --git a/mbsebbs/zmrecv.c b/mbsebbs/zmrecv.c index 8f0db14e..51a52ff6 100644 --- a/mbsebbs/zmrecv.c +++ b/mbsebbs/zmrecv.c @@ -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; } diff --git a/mbsebbs/zmrecv.h b/mbsebbs/zmrecv.h index 8c9aa4b5..79d8bc60 100644 --- a/mbsebbs/zmrecv.h +++ b/mbsebbs/zmrecv.h @@ -3,7 +3,7 @@ /* $Id$ */ -int zmrcvfiles(void); +int zmrcvfiles(int); int putsec(char*,int); int closeit(int);