|
@@ -213,7 +213,6 @@ microdescs_add_list_to_cache(microdesc_cache_t *cache,
|
|
if (fd < 0) {
|
|
if (fd < 0) {
|
|
log_warn(LD_DIR, "Couldn't append to journal in %s: %s",
|
|
log_warn(LD_DIR, "Couldn't append to journal in %s: %s",
|
|
cache->journal_fname, strerror(errno));
|
|
cache->journal_fname, strerror(errno));
|
|
- return NULL;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -238,11 +237,11 @@ microdescs_add_list_to_cache(microdesc_cache_t *cache,
|
|
if (size < 0) {
|
|
if (size < 0) {
|
|
|
|
|
|
abort_writing_to_file(open_file);
|
|
abort_writing_to_file(open_file);
|
|
- smartlist_clear(added);
|
|
+ fd = -1;
|
|
- return added;
|
|
+ } else {
|
|
|
|
+ md->saved_location = SAVED_IN_JOURNAL;
|
|
|
|
+ cache->journal_len += size;
|
|
}
|
|
}
|
|
- md->saved_location = SAVED_IN_JOURNAL;
|
|
|
|
- cache->journal_len += size;
|
|
|
|
} else {
|
|
} else {
|
|
md->saved_location = where;
|
|
md->saved_location = where;
|
|
}
|
|
}
|