--- /dev/null
+ o Minor bugfixes (directory cache):
+ - When a consensus diff calculation is only partially successful, only
+ record the successful parts as having succeeded. Partial success
+ can happen if (for example) one compression method fails but
+ the others succeed. Previously we misrecorded all the calculations as
+ having succeeded, which would later cause a nonfatal assertion failure.
+ Fixes bug 24086; bugfix on 0.3.1.1-alpha.
for (u = 0; u < ARRAY_LENGTH(handles); ++u) {
compress_method_t method = compress_diffs_with[u];
if (cache) {
- cdm_diff_ht_set_status(flav, from_sha3, to_sha3, method, status,
- handles[u]);
+ consensus_cache_entry_handle_t *h = handles[u];
+ int this_status = status;
+ if (h == NULL) {
+ this_status = CDM_DIFF_ERROR;
+ }
+ tor_assert_nonfatal(h != NULL || this_status == CDM_DIFF_ERROR);
+ cdm_diff_ht_set_status(flav, from_sha3, to_sha3, method, this_status, h);
} else {
consensus_cache_entry_handle_free(handles[u]);
}