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
ZerXes
Tor
Commits
691dec5d
Commit
691dec5d
authored
Jan 14, 2019
by
Nick Mathewson
🏃
Browse files
Merge branch 'maint-0.3.5'
parents
99947c3c
9d9e7182
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/bug28920
0 → 100644
View file @
691dec5d
o Minor bugfixes (logging):
- Rework rep_hist_log_link_protocol_counts() to iterate through all link
protocol versions when logging incoming/outgoing connection counts. Tor
no longer skips version 5 and we don't have to remember to update this
function when new link protocol version is developed. Fixes bug 28920;
bugfix on 0.2.6.10.
src/feature/stats/rephist.c
View file @
691dec5d
...
...
@@ -2874,24 +2874,23 @@ rep_hist_get_padding_count_lines(void)
void
rep_hist_log_link_protocol_counts
(
void
)
{
log_notice
(
LD_HEARTBEAT
,
"Since startup, we have initiated "
"%"
PRIu64
" v1 connections, "
"%"
PRIu64
" v2 connections, "
"%"
PRIu64
" v3 connections, and "
"%"
PRIu64
" v4 connections; and received "
"%"
PRIu64
" v1 connections, "
"%"
PRIu64
" v2 connections, "
"%"
PRIu64
" v3 connections, and "
"%"
PRIu64
" v4 connections."
,
(
link_proto_count
[
1
][
1
]),
(
link_proto_count
[
2
][
1
]),
(
link_proto_count
[
3
][
1
]),
(
link_proto_count
[
4
][
1
]),
(
link_proto_count
[
1
][
0
]),
(
link_proto_count
[
2
][
0
]),
(
link_proto_count
[
3
][
0
]),
(
link_proto_count
[
4
][
0
]));
smartlist_t
*
lines
=
smartlist_new
();
for
(
int
i
=
1
;
i
<=
MAX_LINK_PROTO
;
i
++
)
{
char
*
line
=
NULL
;
tor_asprintf
(
&
line
,
"initiated %"
PRIu64
" and received "
"%"
PRIu64
" v%d connections"
,
link_proto_count
[
i
][
1
],
link_proto_count
[
i
][
0
],
i
);
smartlist_add
(
lines
,
line
);
}
char
*
log_line
=
smartlist_join_strings
(
lines
,
"; "
,
0
,
NULL
);
log_notice
(
LD_HEARTBEAT
,
"Since startup we %s."
,
log_line
);
SMARTLIST_FOREACH
(
lines
,
char
*
,
s
,
tor_free
(
s
));
smartlist_free
(
lines
);
tor_free
(
log_line
);
}
/** Free all storage held by the OR/link history caches, by the
...
...
Write
Preview
Markdown
is supported
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