Module Name: src Committed By: rin Date: Fri Mar 26 10:35:08 UTC 2021
Modified Files: src/sys/lib/libsa: tftp.c Log Message: Twiddle also for data transfer for seek. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/lib/libsa/tftp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/lib/libsa/tftp.c diff -u src/sys/lib/libsa/tftp.c:1.36 src/sys/lib/libsa/tftp.c:1.37 --- src/sys/lib/libsa/tftp.c:1.36 Sun Mar 31 20:08:45 2019 +++ src/sys/lib/libsa/tftp.c Fri Mar 26 10:35:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tftp.c,v 1.36 2019/03/31 20:08:45 christos Exp $ */ +/* $NetBSD: tftp.c,v 1.37 2021/03/26 10:35:08 rin Exp $ */ /* * Copyright (c) 1996 @@ -288,11 +288,6 @@ tftp_read(struct open_file *f, void *add int needblock; size_t count; -#if !defined(LIBSA_NO_TWIDDLE) - if (!(tc++ % 16)) - twiddle(); -#endif - needblock = tftpfile->off / SEGSIZE + 1; if (tftpfile->currblock > needblock) { /* seek backwards */ @@ -306,6 +301,11 @@ tftp_read(struct open_file *f, void *add while (tftpfile->currblock < needblock) { int res; +#if !defined(LIBSA_NO_TWIDDLE) + if (!(tc++ % 16)) + twiddle(); +#endif + res = tftp_getnextblock(tftpfile); if (res) { /* no answer */ #ifdef DEBUG