mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Add notion of "longest nickname-or-hex-digest-with-$"
svn:r2108
This commit is contained in:
parent
0c990259de
commit
7b4865ec33
@ -699,7 +699,7 @@ static int generate_runningrouters(crypto_pk_env_t *private_key)
|
||||
char published[33];
|
||||
time_t published_on;
|
||||
|
||||
len = 1024+MAX_NICKNAME_LEN*smartlist_len(descriptor_list);
|
||||
len = 1024+(MAX_HEX_NICKNAME_LEN+2)*smartlist_len(descriptor_list);
|
||||
s = tor_malloc_zero(len);
|
||||
if (list_running_servers(&cp))
|
||||
return -1;
|
||||
|
@ -123,6 +123,8 @@
|
||||
|
||||
#define DEFAULT_BANDWIDTH_OP (1024 * 1000)
|
||||
#define MAX_NICKNAME_LEN 19
|
||||
/* Hex digest plus dollar sign. */
|
||||
#define MAX_HEX_NICKNAME_LEN HEX_DIGEST_LEN+1
|
||||
#define MAX_DIR_SIZE 500000
|
||||
|
||||
#ifdef TOR_PERF
|
||||
|
@ -147,7 +147,7 @@ int all_directory_servers_down(void) {
|
||||
*/
|
||||
void add_nickname_list_to_smartlist(smartlist_t *sl, const char *list) {
|
||||
const char *start,*end;
|
||||
char nick[MAX_NICKNAME_LEN+1];
|
||||
char nick[MAX_HEX_NICKNAME_LEN+1];
|
||||
routerinfo_t *router;
|
||||
|
||||
tor_assert(sl);
|
||||
|
Loading…
Reference in New Issue
Block a user