From: Robert Spalek Date: Sat, 21 Aug 2004 16:30:02 +0000 (+0000) Subject: - bugfix: when disabling compression, change bucket_type X-Git-Tag: holmes-import~897 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=f0e7e9e8a0ae20bf8c0213091f4b062ed9aed607;p=libucw.git - bugfix: when disabling compression, change bucket_type - lizard_bwrite() returns the final bucket_type instead of the number of written bytes --- diff --git a/lib/lizard-fb.c b/lib/lizard-fb.c index 2a4c2d20..5a5c2054 100644 --- a/lib/lizard-fb.c +++ b/lib/lizard-fb.c @@ -51,6 +51,8 @@ lizard_bwrite(struct fastbuf *fb_out, byte *ptr_in, uns len_in) } else { + if (type == BUCKET_TYPE_V33_LIZARD) + type = BUCKET_TYPE_V33; ptr_out = ptr_in; len_out = len_in; } @@ -65,7 +67,7 @@ lizard_bwrite(struct fastbuf *fb_out, byte *ptr_in, uns len_in) bwrite(fb_out, ptr_out, len_out); else bdirect_write_commit(fb_out, ptr_out + len_out); - return len_out + 8 + (type == BUCKET_TYPE_V33_LIZARD ? 8 : 0); + return type; } int