From d9ebe8dcea6bf5b38961ea62ffa15e133a8a9a58 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 24 Oct 1998 08:24:11 +0000 Subject: fix for John. don't seek unless absolutely necessary on files in do_put() (This used to be commit 9d33d405cdbd9ae61fb68b6f5ce5f56f86cc54bb) --- source3/client/client.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source3/client/client.c b/source3/client/client.c index bf38684d3e..efd52ca054 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1953,7 +1953,6 @@ static void do_put(char *rname,char *lname,file_info *finfo) int n = maxwrite; int ret; - fseek(f,nread,SEEK_SET); if ((n = readfile(buf+4,1,n,f)) < 1) { DEBUG(0,("Error reading local file\n")); @@ -1963,13 +1962,14 @@ static void do_put(char *rname,char *lname,file_info *finfo) ret = smb_writefile(outbuf,fnum,nread,buf+4,n); if (n != ret) { - if (!maxwrite) { - DEBUG(0,("Error writing file\n")); - break; - } else { - maxwrite /= 2; - continue; - } + if (!maxwrite) { + DEBUG(0,("Error writing file\n")); + break; + } else { + fseek(f,nread,SEEK_SET); + maxwrite /= 2; + continue; + } } nread += n; -- cgit