diff options
author | Richard Sharpe <sharpe@samba.org> | 1998-09-24 13:43:36 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 1998-09-24 13:43:36 +0000 |
commit | 921b171acfcc7e55c1770bf095d9137e815199b5 (patch) | |
tree | 1571d3d906d5a30ff6e38b601b31f63e3f0db599 /source3/client | |
parent | 6de1659640fa5d2a3b27bec69cd13d87b905d5c4 (diff) | |
download | samba-921b171acfcc7e55c1770bf095d9137e815199b5.tar.gz samba-921b171acfcc7e55c1770bf095d9137e815199b5.tar.bz2 samba-921b171acfcc7e55c1770bf095d9137e815199b5.zip |
Added a minor fix to clitar.c for a bug.
Could not check that it compiles clean with Jeremy's -Wflags because
someone loaded some changes to reply.c that break in the locking area
:-(
(This used to be commit b18cd03c0bf3b7a6815d69a9bbeba7d1b076765c)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/clitar.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index aadb485301..4d7a2cf043 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -307,12 +307,7 @@ static long readtarheader(union hblock *hb, file_info2 *finfo, char *prefix) if (fchk != chk) { DEBUG(0, ("checksums don't match %ld %ld\n", fchk, chk)); -/* for (i = 0; i < sizeof(hb -> dummy); i++) { - fprintf(stdout, "%2X ", hb -> dummy[i]); - } - fprintf(stdout, "\n"); - fprintf(stdout, "%s\n", hb -> dummy); - fprintf(stdout, "Tarbuf = %X, hb = %X\n", (int)tarbuf, (int)hb);*/ + dump_data(5, (char *)hb - TBLOCK, TBLOCK *3); return -1; } @@ -1683,7 +1678,7 @@ static int get_file(file_info2 finfo, char * inbuf, char * outbuf) /* First, skip any initial part of the part written that is left over */ /* from the end of the first TBLOCK */ - if ((bpos + dsize) >= TBLOCK) { + if ((bpos) && ((bpos + dsize) >= TBLOCK)) { dsize -= (TBLOCK - bpos); /* Get rid of the end of the first block */ bpos = 0; @@ -1709,15 +1704,6 @@ static int get_file(file_info2 finfo, char * inbuf, char * outbuf) } - /* if (dsize > 0) { - if (next_block(tarbuf, &buffer_p, tbufsiz) <=0) { - - DEBUG(0, ("Empty file, short tar file, or read error: %s\n", strerror(errno))); - return False; - - } - }*/ - bpos = dsize; } |