aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-09-08 07:16:34 +0000
committerNick Mathewson <nickm@torproject.org>2004-09-08 07:16:34 +0000
commit0ef85f6dbad170d7757b60c782d2b0df87eafb9d (patch)
tree548aaf844bde663bbad40ff7cda1350454496a7d /src/or/dirserv.c
parentc66e4c48704b8be1425c2b6253542beed49ce0eb (diff)
downloadtor-0ef85f6dbad170d7757b60c782d2b0df87eafb9d.tar
tor-0ef85f6dbad170d7757b60c782d2b0df87eafb9d.tar.gz
Some platforms have weird translations when you open files in "test" mode; make read/write_str_to_file aware.
svn:r2336
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ba21c0f00..dc7804b3b 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -652,7 +652,7 @@ void dirserv_set_cached_directory(const char *directory, time_t when)
cached_directory_published = when;
if(get_data_directory(&options)) {
sprintf(filename,"%s/cached-directory", get_data_directory(&options));
- if(write_str_to_file(filename,cached_directory) < 0) {
+ if(write_str_to_file(filename,cached_directory,0) < 0) {
log_fn(LOG_WARN, "Couldn't write cached directory to disk. Ignoring.");
}
}
@@ -725,7 +725,7 @@ static int dirserv_regenerate_directory(void)
free(new_directory);
if(get_data_directory(&options)) {
sprintf(filename,"%s/cached-directory", get_data_directory(&options));
- if(write_str_to_file(filename,the_directory) < 0) {
+ if(write_str_to_file(filename,the_directory,0) < 0) {
log_fn(LOG_WARN, "Couldn't write cached directory to disk. Ignoring.");
}
}