Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mike Perry
Tor
Commits
706392e6
Commit
706392e6
authored
Aug 03, 2017
by
George Kadianakis
Committed by
Nick Mathewson
Aug 08, 2017
Browse files
Make HidServRevCounter be a LINELIST as it should.
parent
3ce69a58
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/or/hs_service.c
View file @
706392e6
...
...
@@ -2015,8 +2015,8 @@ update_revision_counters_in_state(void)
}
FOR_EACH_SERVICE_END
;
/* Remove the old rev counters, and replace them with the new ones */
config_free_lines
(
state
->
HidServRevCounter
s
);
state
->
HidServRevCounter
s
=
lines
;
config_free_lines
(
state
->
HidServRevCounter
);
state
->
HidServRevCounter
=
lines
;
/* Set the state as dirty since we just edited it */
if
(
!
get_options
()
->
AvoidDiskWrites
)
{
...
...
@@ -2101,13 +2101,13 @@ get_rev_counter_for_service(ed25519_public_key_t *blinded_pubkey)
/* Set default value for rev counters (if not found) to 0 */
uint64_t
final_rev_counter
=
0
;
for
(
line
=
state
->
HidServRevCounter
s
;
line
;
line
=
line
->
next
)
{
for
(
line
=
state
->
HidServRevCounter
;
line
;
line
=
line
->
next
)
{
int
service_found
=
0
;
uint64_t
rev_counter
=
0
;
tor_assert
(
!
strcmp
(
line
->
key
,
"HidServRevCounter"
));
/* Scan all the HidServRevCounter
s
lines till we find the line for this
/* Scan all the HidServRevCounter lines till we find the line for this
service: */
rev_counter
=
check_state_line_for_service_rev_counter
(
line
->
value
,
blinded_pubkey
,
...
...
src/or/or.h
View file @
706392e6
...
...
@@ -4627,7 +4627,7 @@ typedef struct {
config_line_t
*
TransportProxies
;
/** Cached revision counters for active hidden services on this host */
config_line_t
*
HidServRevCounter
s
;
config_line_t
*
HidServRevCounter
;
/** These fields hold information on the history of bandwidth usage for
* servers. The "Ends" fields hold the time when we last updated the
...
...
src/or/statefile.c
View file @
706392e6
...
...
@@ -85,8 +85,7 @@ static config_var_t state_vars_[] = {
VAR
(
"TransportProxy"
,
LINELIST_S
,
TransportProxies
,
NULL
),
V
(
TransportProxies
,
LINELIST_V
,
NULL
),
VAR
(
"HidServRevCounter"
,
LINELIST_S
,
HidServRevCounters
,
NULL
),
V
(
HidServRevCounters
,
LINELIST_V
,
NULL
),
V
(
HidServRevCounter
,
LINELIST
,
NULL
),
V
(
BWHistoryReadEnds
,
ISOTIME
,
NULL
),
V
(
BWHistoryReadInterval
,
UINT
,
"900"
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment