summaryrefslogtreecommitdiff
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
commitd9ebe8dcea6bf5b38961ea62ffa15e133a8a9a58 (patch)
tree123be263c12e0c652737c7b9b7de28f0e59b4096
parentc90d22c6c51dfbf3776217d03e64df435944fd68 (diff)
downloadsamba-d9ebe8dcea6bf5b38961ea62ffa15e133a8a9a58.tar.gz
samba-d9ebe8dcea6bf5b38961ea62ffa15e133a8a9a58.tar.bz2
samba-d9ebe8dcea6bf5b38961ea62ffa15e133a8a9a58.zip
fix for John.
don't seek unless absolutely necessary on files in do_put() (This used to be commit 9d33d405cdbd9ae61fb68b6f5ce5f56f86cc54bb)
-rw-r--r--source3/client/client.c16
1 files 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;