PERFORCE change 96333 for review
Warner Losh
imp at FreeBSD.org
Fri Apr 28 22:16:14 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=96333
Change 96333 by imp at 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);
More information about the p4-projects
mailing list