Skip to content

Commit

Permalink
twom fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
brong committed Dec 20, 2024
1 parent 4a2d278 commit 08a6e45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/cyrusdb_twom.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ static int read_onerecord(struct dbengine *db, size_t offset,
record->ancestor = ntohll(*((uint64_t *)ptr));
offset += 8;
}
else {
record->ancestor = 0;
}

if (record->keylen == UINT16_MAX) {
ptr = base + offset;
Expand Down Expand Up @@ -2659,6 +2662,7 @@ static int delete(struct dbengine *db,
static int myinit(const char *dbdir __attribute__((unused)), int flags __attribute__((unused)))
{
const char *checksum_engine = libcyrus_config_getstring(CYRUSOPT_TWOM_CHECKSUM_ENGINE);
if (!checksum_engine) return TWOM_CHECKSUM_XXH64;
if (!strcmp(checksum_engine, "null")) {
twom_default_checksum_engine = TWOM_CHECKSUM_NULL;
}
Expand Down

0 comments on commit 08a6e45

Please sign in to comment.