circuitbuild: Make some functions mockable

Part of 33633.
This commit is contained in:
teor 2020-04-03 19:01:19 +10:00
parent 46980d767d
commit 42fdbbb50b
2 changed files with 10 additions and 10 deletions

View file

@ -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 * and then calls command_setup_channel() to give it the right
* callbacks. * callbacks.
*/ */
channel_t * MOCK_IMPL(channel_t *,
channel_connect_for_circuit(const tor_addr_t *addr, uint16_t port, channel_connect_for_circuit,(const tor_addr_t *addr, uint16_t port,
const char *id_digest, const char *id_digest,
const struct ed25519_public_key_t *ed_id) const struct ed25519_public_key_t *ed_id))
{ {
channel_t *chan; channel_t *chan;

View file

@ -73,13 +73,13 @@ void circuit_upgrade_circuits_from_guard_wait(void);
struct ed25519_public_key_t; struct ed25519_public_key_t;
channel_t * MOCK_DECL(channel_t *,
channel_connect_for_circuit(const tor_addr_t *addr, channel_connect_for_circuit,(const tor_addr_t *addr,
uint16_t port, uint16_t port,
const char *id_digest, const char *id_digest,
const struct ed25519_public_key_t *ed_id); const struct ed25519_public_key_t *ed_id));
struct create_cell_t;
struct create_cell_t;
int int
circuit_deliver_create_cell(circuit_t *circ, circuit_deliver_create_cell(circuit_t *circ,
const struct create_cell_t *create_cell, const struct create_cell_t *create_cell,