mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Fix a couple of bugs in last patch.
svn:r6644
This commit is contained in:
parent
c58cc8c16c
commit
347bcec84a
@ -1507,7 +1507,8 @@ directory_handle_command_get(connection_t *conn, char *headers,
|
|||||||
if (deflated)
|
if (deflated)
|
||||||
url[url_len-2] = '\0';
|
url[url_len-2] = '\0';
|
||||||
conn->fingerprint_stack = smartlist_create();
|
conn->fingerprint_stack = smartlist_create();
|
||||||
res = dirserv_get_routerdescs(conn->fingerprint_stack, url, &msg);
|
res = dirserv_get_routerdesc_fingerprints(conn->fingerprint_stack, url,
|
||||||
|
&msg);
|
||||||
|
|
||||||
if (!strcmpstart(url, "/tor/server/fp/"))
|
if (!strcmpstart(url, "/tor/server/fp/"))
|
||||||
request_type = deflated?"/tor/server/fp.z":"/tor/server/fp";
|
request_type = deflated?"/tor/server/fp.z":"/tor/server/fp";
|
||||||
|
@ -1750,13 +1750,13 @@ dirserv_orconn_tls_done(const char *address,
|
|||||||
static int
|
static int
|
||||||
connection_dirserv_add_servers_to_outbuf(connection_t *conn)
|
connection_dirserv_add_servers_to_outbuf(connection_t *conn)
|
||||||
{
|
{
|
||||||
int fp = conn->dir_refresh_src == DIR_REFRESH_SERVER_BY_FP;
|
int by_fp = conn->dir_refresh_src == DIR_REFRESH_SERVER_BY_FP;
|
||||||
|
|
||||||
while (smartlist_len(conn->fingerprint_stack) &&
|
while (smartlist_len(conn->fingerprint_stack) &&
|
||||||
buf_datalen(conn->outbuf) < DIRSERV_BUFFER_MIN) {
|
buf_datalen(conn->outbuf) < DIRSERV_BUFFER_MIN) {
|
||||||
char *fp = smartlist_pop_last(conn->fingerprint_stack);
|
char *fp = smartlist_pop_last(conn->fingerprint_stack);
|
||||||
signed_descriptor_t *sd = NULL;
|
signed_descriptor_t *sd = NULL;
|
||||||
if (fp) {
|
if (by_fp) {
|
||||||
if (router_digest_is_me(fp)) {
|
if (router_digest_is_me(fp)) {
|
||||||
sd = &(router_get_my_routerinfo()->cache_info);
|
sd = &(router_get_my_routerinfo()->cache_info);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user