Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jarl
tor
Commits
7b4865ec
Commit
7b4865ec
authored
20 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Add notion of "longest nickname-or-hex-digest-with-$"
svn:r2108
parent
0c990259
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/or/dirserv.c
+1
-1
1 addition, 1 deletion
src/or/dirserv.c
src/or/or.h
+2
-0
2 additions, 0 deletions
src/or/or.h
src/or/routerlist.c
+1
-1
1 addition, 1 deletion
src/or/routerlist.c
with
4 additions
and
2 deletions
src/or/dirserv.c
+
1
−
1
View file @
7b4865ec
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
src/or/or.h
+
2
−
0
View file @
7b4865ec
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/or/routerlist.c
+
1
−
1
View file @
7b4865ec
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment