aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-10-31 16:09:41 -0400
committerNick Mathewson <nickm@torproject.org>2013-10-31 16:09:41 -0400
commit5cc155e02a995fda828ff33b105040b2bd96a650 (patch)
treebcc2b2eeb43268769bc16048b80adc1e266eeb5b /src
parentdb2c2a69091724037e0e6dd0c58f0b18558ce437 (diff)
parent264aa271a734767a13065bc6e0d15c4d8c602005 (diff)
downloadtor-5cc155e02a995fda828ff33b105040b2bd96a650.tar
tor-5cc155e02a995fda828ff33b105040b2bd96a650.tar.gz
Merge remote-tracking branch 'public/bug9645' into maint-0.2.4
Diffstat (limited to 'src')
-rw-r--r--src/or/microdesc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/or/microdesc.c b/src/or/microdesc.c
index b93bd83af..8b5581f4a 100644
--- a/src/or/microdesc.c
+++ b/src/or/microdesc.c
@@ -213,7 +213,6 @@ microdescs_add_list_to_cache(microdesc_cache_t *cache,
if (fd < 0) {
log_warn(LD_DIR, "Couldn't append to journal in %s: %s",
cache->journal_fname, strerror(errno));
- return NULL;
}
}
@@ -238,11 +237,11 @@ microdescs_add_list_to_cache(microdesc_cache_t *cache,
if (size < 0) {
/* we already warned in dump_microdescriptor */
abort_writing_to_file(open_file);
- smartlist_clear(added);
- return added;
+ fd = -1;
+ } else {
+ md->saved_location = SAVED_IN_JOURNAL;
+ cache->journal_len += size;
}
- md->saved_location = SAVED_IN_JOURNAL;
- cache->journal_len += size;
} else {
md->saved_location = where;
}