- struct odes *o = obj_read_bucket(buck_buf, pool, h->type, h->length, b, NULL);
- if (!o)
- bprintf(out, "Cannot parse bucket %x of type %x and length %d: %m\n", h->oid, h->type, h->length);
+ struct odes *o_hdr, *o_body;
+ mp_flush(pool);
+ o_hdr = obj_new(pool);
+ o_body = obj_new(pool);
+ if (buck2obj_parse(buck_buf, h->type, h->length, b, o_hdr, NULL, o_body) < 0)
+ bprintf(out, ".Cannot parse bucket %x of type %x and length %d: %m\n", h->oid, h->type, h->length);