diff options
author | Roger Dingledine <arma@torproject.org> | 2003-12-14 06:03:46 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-12-14 06:03:46 +0000 |
commit | 36ea39ec9caa47cd804887655947002eeab71a16 (patch) | |
tree | e8f630101654e0193e168243b106a1030bd29be4 /src/or/dirserv.c | |
parent | 50e17d633bec55943322bd547003cf3625ce05e1 (diff) | |
download | tor-36ea39ec9caa47cd804887655947002eeab71a16.tar.gz tor-36ea39ec9caa47cd804887655947002eeab71a16.zip |
on hup, close and rebind listener ports too (in case their config has changed)
svn:r926
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 4db989b6b0..8dc4de0080 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -52,7 +52,7 @@ dirserv_add_own_fingerprint(const char *nickname, crypto_pk_env_t *pk) } /* return 0 on success, -1 on failure */ -int +int dirserv_parse_fingerprint_file(const char *fname) { FILE *file; @@ -172,7 +172,7 @@ static void free_descriptor_entry(descriptor_entry_t *desc) free(desc); } -void +void dirserv_free_descriptors() { int i; @@ -311,7 +311,7 @@ dirserv_init_from_directory_string(const char *dir) return 0; } -static int +static int list_running_servers(char **nicknames_out) { char *nickname_lst[MAX_ROUTERS_IN_DIR]; @@ -323,7 +323,7 @@ list_running_servers(char **nicknames_out) int length; *nicknames_out = NULL; nickname_lst[n++] = options.Nickname; - + get_connection_array(&connection_array, &n_conns); for (i = 0; i<n_conns; ++i) { conn = connection_array[i]; @@ -349,7 +349,6 @@ list_running_servers(char **nicknames_out) return 0; } - int dirserv_dump_directory_to_string(char *s, int maxlen, crypto_pk_env_t *private_key) @@ -400,8 +399,7 @@ dirserv_dump_directory_to_string(char *s, int maxlen, ((int)digest[0])&0xff,((int)digest[1])&0xff, ((int)digest[2])&0xff,((int)digest[3])&0xff); - strncpy(cp, - "-----BEGIN SIGNATURE-----\n", maxlen-i); + strncpy(cp, "-----BEGIN SIGNATURE-----\n", maxlen-i); i = strlen(s); cp = s+i; |