mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r11784@Kushana: nickm | 2007-01-02 01:13:04 -0500
Spec-conformance on r9181: make "opt v" strings start with "Tor". svn:r9233
This commit is contained in:
+9
-7
@@ -1563,14 +1563,16 @@ generate_v2_networkstatus(void)
|
||||
outp += strlen(outp);
|
||||
if (ri->platform && !strcmpstart(ri->platform, "Tor ")) {
|
||||
const char *eos = find_whitespace(ri->platform+4);
|
||||
char *platform = tor_strndup(ri->platform+4, eos-(ri->platform+4));
|
||||
if (tor_snprintf(outp, endp-outp,
|
||||
"opt v %s\n", platform)<0) {
|
||||
log_warn(LD_BUG, "Unable to print router version.");
|
||||
goto done;
|
||||
if (eos) {
|
||||
char *platform = tor_strndup(ri->platform, eos-(ri->platform));
|
||||
if (tor_snprintf(outp, endp-outp,
|
||||
"opt v %s\n", platform)<0) {
|
||||
log_warn(LD_BUG, "Unable to print router version.");
|
||||
goto done;
|
||||
}
|
||||
tor_free(platform);
|
||||
outp += strlen(outp);
|
||||
}
|
||||
tor_free(platform);
|
||||
outp += strlen(outp);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user