diff options
author | teor <teor@torproject.org> | 2020-04-03 19:01:19 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2020-04-09 11:00:04 +1000 |
commit | 42fdbbb50bbb9d0f2e15012256a088f3f1c22f8d (patch) | |
tree | 101ba1cc7f03f673c4a049d3f6f3788b3831a5d0 /src | |
parent | 46980d767d643abe4415b3ea7e6728aecb848119 (diff) | |
download | tor-42fdbbb50bbb9d0f2e15012256a088f3f1c22f8d.tar.gz tor-42fdbbb50bbb9d0f2e15012256a088f3f1c22f8d.zip |
circuitbuild: Make some functions mockable
Part of 33633.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/circuitbuild.c | 8 | ||||
-rw-r--r-- | src/core/or/circuitbuild.h | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c index 0527548f27..71a51e61a4 100644 --- a/src/core/or/circuitbuild.c +++ b/src/core/or/circuitbuild.c @@ -95,10 +95,10 @@ static const node_t *choose_good_middle_server(uint8_t purpose, * and then calls command_setup_channel() to give it the right * callbacks. */ -channel_t * -channel_connect_for_circuit(const tor_addr_t *addr, uint16_t port, - const char *id_digest, - const struct ed25519_public_key_t *ed_id) +MOCK_IMPL(channel_t *, +channel_connect_for_circuit,(const tor_addr_t *addr, uint16_t port, + const char *id_digest, + const struct ed25519_public_key_t *ed_id)) { channel_t *chan; diff --git a/src/core/or/circuitbuild.h b/src/core/or/circuitbuild.h index c66c0dc752..cf99990927 100644 --- a/src/core/or/circuitbuild.h +++ b/src/core/or/circuitbuild.h @@ -73,13 +73,13 @@ void circuit_upgrade_circuits_from_guard_wait(void); struct ed25519_public_key_t; -channel_t * -channel_connect_for_circuit(const tor_addr_t *addr, - uint16_t port, - const char *id_digest, - const struct ed25519_public_key_t *ed_id); -struct create_cell_t; +MOCK_DECL(channel_t *, +channel_connect_for_circuit,(const tor_addr_t *addr, + uint16_t port, + const char *id_digest, + const struct ed25519_public_key_t *ed_id)); +struct create_cell_t; int circuit_deliver_create_cell(circuit_t *circ, const struct create_cell_t *create_cell, |