light: fix invalid version links based on outdated prev version

This commit is contained in:
Thomas Schoebel-Theuer 2012-09-11 08:22:07 +02:00 committed by Thomas Schoebel-Theuer
parent 64d6397711
commit 5365063c58
1 changed files with 4 additions and 0 deletions

View File

@ -1457,6 +1457,10 @@ int _update_versionlink(struct mars_global *global, const char *parent_path, con
MARS_ERR("cannot sscanf() old version symlink '%s', pos=%d, count=%d\n", check->new_link, pos, count);
} else if (unlikely(old_start_pos > start_pos || old_end_pos > end_pos)) {
MARS_ERR("BACKSKIP old version symlink '%s', new host='%s', sequence=%d, start_pos=%lld, end_pos=%lld\n", check->new_link, host, sequence, start_pos, end_pos);
} else { // update dent
brick_string_free(check->old_link);
check->old_link = check->new_link;
check->new_link = brick_strdup(old);
}
}