diff options
author | Peter Retzlaff <pe.retzlaff@gmail.com> | 2013-01-25 11:49:33 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-05-24 13:12:18 -0400 |
commit | 5b7eaa3765b8c616c93dbda26a02c780d5c95084 (patch) | |
tree | bd42d59bdb86c43a672638da772a1b6b3268b365 /src/or/config.h | |
parent | b4b0063e48a2687e7971730defc9b5a99a396cc4 (diff) | |
download | tor-5b7eaa3765b8c616c93dbda26a02c780d5c95084.tar.gz tor-5b7eaa3765b8c616c93dbda26a02c780d5c95084.zip |
Extract duplicate code in geoip and rephist.
Create new methods check_or_create_data_subdir() and
write_to_data_subdir() in config.c and use them throughout
rephist.c and geoip.c.
This should solve ticket #4282.
Diffstat (limited to 'src/or/config.h')
-rw-r--r-- | src/or/config.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/config.h b/src/or/config.h index fbdedcfb50..0250f645d0 100644 --- a/src/or/config.h +++ b/src/or/config.h @@ -59,6 +59,10 @@ char *options_get_datadir_fname2_suffix(const or_options_t *options, #define get_datadir_fname_suffix(sub1, suffix) \ get_datadir_fname2_suffix((sub1), NULL, (suffix)) +int check_or_create_data_subdir(const char *subdir); +int write_to_data_subdir(const char* subdir, const char* fname, + const char* str, const char* descr); + int get_num_cpus(const or_options_t *options); const smartlist_t *get_configured_ports(void); |