From owner-p4-projects@FreeBSD.ORG Fri Apr 28 22:16:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F128316A402; Fri, 28 Apr 2006 22:16:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA5DA16A408 for ; Fri, 28 Apr 2006 22:16:13 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9658643D46 for ; Fri, 28 Apr 2006 22:16:13 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3SMGD3w013976 for ; Fri, 28 Apr 2006 22:16:13 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3SMGD62013973 for perforce@freebsd.org; Fri, 28 Apr 2006 22:16:13 GMT (envelope-from imp@freebsd.org) Date: Fri, 28 Apr 2006 22:16:13 GMT Message-Id: <200604282216.k3SMGD62013973@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 96333 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 22:16:14 -0000 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);