mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
Make circuitmux_compare_muxes() and circuitmux_get_policy() mockable
This commit is contained in:
parent
030608d68d
commit
c5f73e52e5
2 changed files with 8 additions and 6 deletions
|
@ -621,8 +621,8 @@ circuitmux_clear_policy(circuitmux_t *cmux)
|
||||||
* Return the policy currently installed on a circuitmux_t
|
* Return the policy currently installed on a circuitmux_t
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const circuitmux_policy_t *
|
MOCK_IMPL(const circuitmux_policy_t *,
|
||||||
circuitmux_get_policy(circuitmux_t *cmux)
|
circuitmux_get_policy, (circuitmux_t *cmux))
|
||||||
{
|
{
|
||||||
tor_assert(cmux);
|
tor_assert(cmux);
|
||||||
|
|
||||||
|
@ -1961,8 +1961,8 @@ circuitmux_count_queued_destroy_cells(const channel_t *chan,
|
||||||
* support the cmp_cmux method, return 0.
|
* support the cmp_cmux method, return 0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
MOCK_IMPL(int,
|
||||||
circuitmux_compare_muxes(circuitmux_t *cmux_1, circuitmux_t *cmux_2)
|
circuitmux_compare_muxes, (circuitmux_t *cmux_1, circuitmux_t *cmux_2))
|
||||||
{
|
{
|
||||||
const circuitmux_policy_t *policy;
|
const circuitmux_policy_t *policy;
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,8 @@ void circuitmux_free(circuitmux_t *cmux);
|
||||||
|
|
||||||
/* Policy control */
|
/* Policy control */
|
||||||
void circuitmux_clear_policy(circuitmux_t *cmux);
|
void circuitmux_clear_policy(circuitmux_t *cmux);
|
||||||
const circuitmux_policy_t * circuitmux_get_policy(circuitmux_t *cmux);
|
MOCK_DECL(const circuitmux_policy_t *,
|
||||||
|
circuitmux_get_policy, (circuitmux_t *cmux));
|
||||||
void circuitmux_set_policy(circuitmux_t *cmux,
|
void circuitmux_set_policy(circuitmux_t *cmux,
|
||||||
const circuitmux_policy_t *pol);
|
const circuitmux_policy_t *pol);
|
||||||
|
|
||||||
|
@ -152,7 +153,8 @@ void circuitmux_mark_destroyed_circids_usable(circuitmux_t *cmux,
|
||||||
channel_t *chan);
|
channel_t *chan);
|
||||||
|
|
||||||
/* Optional interchannel comparisons for scheduling */
|
/* Optional interchannel comparisons for scheduling */
|
||||||
int circuitmux_compare_muxes(circuitmux_t *cmux_1, circuitmux_t *cmux_2);
|
MOCK_DECL(int, circuitmux_compare_muxes,
|
||||||
|
(circuitmux_t *cmux_1, circuitmux_t *cmux_2));
|
||||||
|
|
||||||
#endif /* TOR_CIRCUITMUX_H */
|
#endif /* TOR_CIRCUITMUX_H */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue