Date: Fri, 28 Apr 2006 22:16:13 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96333 for review Message-ID: <200604282216.k3SMGD62013973@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96333 Change 96333 by imp@imp_hammer on 2006/04/28 22:15:50 Increase timeout. This makes the download very reliable now for larege transfers. Before we'd timeout too fast. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#5 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/xmodem.c#5 (text) ==== @@ -39,6 +39,7 @@ #define CAN 0x18 /* Cancel */ #define EOT 0x04 /* end of text */ +#define TO 10 /* * int GetRecord(char , char *) * This private function receives a x-modem record to the pointer and @@ -53,17 +54,17 @@ chk = 0; - if ((ch = getc(1)) == -1) + if ((ch = getc(TO)) == -1) goto err; - if (ch != blocknum) + if (ch != blocknum) goto err; - if ((ch = getc(1)) == -1) + if ((ch = getc(TO)) == -1) goto err; if (ch != (~blocknum & 0xff)) goto err; for (size = 0; size < PACKET_SIZE; ++size) { - if ((ch = getc(1)) == -1) + if ((ch = getc(TO)) == -1) goto err; chk = chk ^ ch << 8; for (j = 0; j < 8; ++j) { @@ -77,10 +78,10 @@ chk &= 0xFFFF; - if (((ch = getc(1)) == -1) || ((ch & 0xff) != ((chk >> 8) & 0xFF))) - goto err; - if (((ch = getc(1)) == -1) || ((ch & 0xff) != (chk & 0xFF))) - goto err; + if (((ch = getc(TO)) == -1) || ((ch & 0xff) != ((chk >> 8) & 0xFF))) + goto err; + if (((ch = getc(TO)) == -1) || ((ch & 0xff) != (chk & 0xFF))) + goto err; putchar(ACK); return (1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604282216.k3SMGD62013973>