mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-03 17:13:33 +01:00
Revive our beautiful unit tests.
They broke when the PT_PROTO_INFANT proxy state was added.
This commit is contained in:
parent
3be9d76fa2
commit
1174bb95ce
@ -13,11 +13,9 @@
|
|||||||
static void
|
static void
|
||||||
reset_mp(managed_proxy_t *mp)
|
reset_mp(managed_proxy_t *mp)
|
||||||
{
|
{
|
||||||
mp->conf_state = PT_PROTO_INFANT;
|
mp->conf_state = PT_PROTO_LAUNCHED;
|
||||||
SMARTLIST_FOREACH(mp->transports, transport_t *, t, transport_free(t));
|
SMARTLIST_FOREACH(mp->transports, transport_t *, t, transport_free(t));
|
||||||
smartlist_clear(mp->transports);
|
smartlist_clear(mp->transports);
|
||||||
smartlist_free(mp->transports);
|
|
||||||
mp->transports = smartlist_create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -94,7 +92,7 @@ test_pt_protocol(void)
|
|||||||
char line[200];
|
char line[200];
|
||||||
|
|
||||||
managed_proxy_t *mp = tor_malloc(sizeof(managed_proxy_t));
|
managed_proxy_t *mp = tor_malloc(sizeof(managed_proxy_t));
|
||||||
mp->conf_state = PT_PROTO_INFANT;
|
mp->conf_state = PT_PROTO_LAUNCHED;
|
||||||
mp->transports = smartlist_create();
|
mp->transports = smartlist_create();
|
||||||
|
|
||||||
/* various wrong protocol runs: */
|
/* various wrong protocol runs: */
|
||||||
|
Loading…
Reference in New Issue
Block a user