]> mj.ucw.cz Git - libucw.git/commitdiff
- bugfix: when disabling compression, change bucket_type
authorRobert Spalek <robert@ucw.cz>
Sat, 21 Aug 2004 16:30:02 +0000 (16:30 +0000)
committerRobert Spalek <robert@ucw.cz>
Sat, 21 Aug 2004 16:30:02 +0000 (16:30 +0000)
- lizard_bwrite() returns the final bucket_type instead of the number of
  written bytes

lib/lizard-fb.c

index 2a4c2d2029791b54b61aae45108f7c351480811c..5a5c20547f5653af7c331d9a78aa3eb9c45b9760 100644 (file)
@@ -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