- Fix issues that prevented rsync support from working.

This commit is contained in:
Ulf Lilleengen 2008-11-20 12:23:44 +00:00
parent d0d1701140
commit bd337e58c3
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ rsync_chooseblocksize(size_t fsize)
}
bestrem = MAXBLOCKSIZE;
for (bs = losearch; bs <= hisearch;) {
for (bs = losearch; bs <= hisearch; bs++) {
rem = fsize % bs;
if (rem < bestrem) {
bestrem = rem;

View File

@ -2078,7 +2078,7 @@ updater_rsync(struct updater *up, struct file_update *fup, size_t blocksize)
if (proto_get_sizet(&line, &blockcount, 10) != 0)
goto bad;
/* Read blocks from original file. */
lseek(orig, SEEK_SET, (blocksize * blockstart));
lseek(orig, (blocksize * blockstart), SEEK_SET);
error = UPDATER_ERR_MSG;
for (blocknum = 0; blocknum < blockcount; blocknum++) {
nbytes = read(orig, buf, blocksize);