diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-09-08 07:16:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-09-08 07:16:34 +0000 |
commit | 0ef85f6dbad170d7757b60c782d2b0df87eafb9d (patch) | |
tree | 548aaf844bde663bbad40ff7cda1350454496a7d /src/or/router.c | |
parent | c66e4c48704b8be1425c2b6253542beed49ce0eb (diff) | |
download | tor-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/router.c')
-rw-r--r-- | src/or/router.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c index 2b89bef8d..8eb483643 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -319,7 +319,7 @@ int init_keys(void) { sprintf(keydir,"%s/router.desc", datadir); log_fn(LOG_INFO,"Dumping descriptor to %s...",keydir); - if (write_str_to_file(keydir, mydesc)) { + if (write_str_to_file(keydir, mydesc,0)) { return -1; } /* 5. Dump fingerprint to 'fingerprint' */ @@ -334,7 +334,7 @@ int init_keys(void) { return -1; } strcat(fingerprint, "\n"); - if (write_str_to_file(keydir, fingerprint)) + if (write_str_to_file(keydir, fingerprint, 0)) return -1; if(!authdir_mode()) return 0; @@ -348,7 +348,7 @@ int init_keys(void) { /* 7. [authdirserver only] load old directory, if it's there */ sprintf(keydir,"%s/cached-directory", datadir); log_fn(LOG_INFO,"Loading cached directory from %s...",keydir); - cp = read_file_to_str(keydir); + cp = read_file_to_str(keydir,0); if(!cp) { log_fn(LOG_INFO,"Cached directory %s not present. Ok.",keydir); } else { |