summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-24 08:24:11 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-24 08:24:11 +0000
commit9d33d405cdbd9ae61fb68b6f5ce5f56f86cc54bb (patch)
tree97138ccc3a9162743a6db7f7f43adc2e2c31d8d6 /source
parent85f639ab2ba72dda5a00cf11c8ee705f5a51ec54 (diff)
downloadsamba-9d33d405cdbd9ae61fb68b6f5ce5f56f86cc54bb.tar.gz
samba-9d33d405cdbd9ae61fb68b6f5ce5f56f86cc54bb.tar.xz
samba-9d33d405cdbd9ae61fb68b6f5ce5f56f86cc54bb.zip
fix for John.
don't seek unless absolutely necessary on files in do_put()
Diffstat (limited to 'source')
-rw-r--r--source/client/client.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/client/client.c b/source/client/client.c
index bf38684d3e8..efd52ca0543 100644
--- a/source/client/client.c
+++ b/source/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;