diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-09-06 11:38:32 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-09-06 11:38:32 -0400 |
commit | f4cf279eb58f5d0a61f603bd961b58e51cd82bc3 (patch) | |
tree | 1cba486155d27bb1a4e0dd56032e7825376df264 /src/or | |
parent | 09c84b50e71a7c65f1b891e396bb9ad811588dad (diff) | |
download | tor-f4cf279eb58f5d0a61f603bd961b58e51cd82bc3.tar.gz tor-f4cf279eb58f5d0a61f603bd961b58e51cd82bc3.zip |
Rename extend_info_alloc() --> _new()
Based on a patch from Linus, regenerated so as to not conflict with
Linus's 5535/6363 patches.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/circuitbuild.c | 10 | ||||
-rw-r--r-- | src/or/circuitbuild.h | 2 | ||||
-rw-r--r-- | src/or/circuituse.c | 2 | ||||
-rw-r--r-- | src/or/router.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 87a3fa67b1..8aa80cd8e2 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -2470,7 +2470,7 @@ circuit_extend(cell_t *cell, circuit_t *circ) log_debug(LD_CIRC|LD_OR,"Next router (%s:%d): %s", fmt_addr(&n_addr), (int)n_port, msg?msg:"????"); - circ->n_hop = extend_info_alloc(NULL /*nickname*/, + circ->n_hop = extend_info_new(NULL /*nickname*/, id_digest, NULL /*onion_key*/, &n_addr, n_port); @@ -3846,7 +3846,7 @@ onion_append_hop(crypt_path_t **head_ptr, extend_info_t *choice) /** Allocate a new extend_info object based on the various arguments. */ extend_info_t * -extend_info_alloc(const char *nickname, const char *digest, +extend_info_new(const char *nickname, const char *digest, crypto_pk_t *onion_key, const tor_addr_t *addr, uint16_t port) { @@ -3887,13 +3887,13 @@ extend_info_from_node(const node_t *node, int for_direct_connect) node->ri ? node->ri->nickname : node->rs->nickname); if (node->ri) - return extend_info_alloc(node->ri->nickname, + return extend_info_new(node->ri->nickname, node->identity, node->ri->onion_pkey, &ap.addr, ap.port); else if (node->rs && node->md) - return extend_info_alloc(node->rs->nickname, + return extend_info_new(node->rs->nickname, node->identity, node->md->onion_pkey, &ap.addr, @@ -5382,7 +5382,7 @@ routerset_contains_bridge(const routerset_t *routerset, if (!routerset) return 0; - extinfo = extend_info_alloc( + extinfo = extend_info_new( NULL, bridge->identity, NULL, &bridge->addr, bridge->port); result = routerset_contains_extendinfo(routerset, extinfo); extend_info_free(extinfo); diff --git a/src/or/circuitbuild.h b/src/or/circuitbuild.h index 7083db12fb..bc775c3775 100644 --- a/src/or/circuitbuild.h +++ b/src/or/circuitbuild.h @@ -41,7 +41,7 @@ int circuit_all_predicted_ports_handled(time_t now, int *need_uptime, int circuit_append_new_exit(origin_circuit_t *circ, extend_info_t *info); int circuit_extend_to_new_exit(origin_circuit_t *circ, extend_info_t *info); void onion_append_to_cpath(crypt_path_t **head_ptr, crypt_path_t *new_hop); -extend_info_t *extend_info_alloc(const char *nickname, const char *digest, +extend_info_t *extend_info_new(const char *nickname, const char *digest, crypto_pk_t *onion_key, const tor_addr_t *addr, uint16_t port); extend_info_t *extend_info_from_node(const node_t *r, int for_direct_connect); diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 20f124eb4e..11d581148a 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -1570,7 +1570,7 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn, escaped_safe_str_client(conn->socks_request->address)); return -1; } - extend_info = extend_info_alloc(conn->chosen_exit_name+1, + extend_info = extend_info_new(conn->chosen_exit_name+1, digest, NULL, &addr, conn->socks_request->port); } else { diff --git a/src/or/router.c b/src/or/router.c index 9a3ef9dccf..bb8a6e3721 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -891,7 +891,7 @@ extend_info_from_router(const routerinfo_t *r) tor_assert(r); router_get_prim_orport(r, &ap); - return extend_info_alloc(r->nickname, r->cache_info.identity_digest, + return extend_info_new(r->nickname, r->cache_info.identity_digest, r->onion_pkey, &ap.addr, ap.port); } |