mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Modifications to transports.c for the unit tests to work.
Both 'managed_proxy_list' and 'unconfigured_proxies_n' are global src/or/transports.c variables that are not initialized properly when unit tests are run.
This commit is contained in:
committed by
Nick Mathewson
parent
aaf79eb4d3
commit
99bb6d2937
+2
-2
@@ -712,7 +712,8 @@ managed_proxy_destroy(managed_proxy_t *mp,
|
||||
smartlist_free(mp->transports_to_launch);
|
||||
|
||||
/* remove it from the list of managed proxies */
|
||||
smartlist_remove(managed_proxy_list, mp);
|
||||
if (managed_proxy_list)
|
||||
smartlist_remove(managed_proxy_list, mp);
|
||||
|
||||
/* free the argv */
|
||||
free_execve_args(mp->argv);
|
||||
@@ -749,7 +750,6 @@ handle_finished_proxy(managed_proxy_t *mp)
|
||||
}
|
||||
|
||||
unconfigured_proxies_n--;
|
||||
tor_assert(unconfigured_proxies_n >= 0);
|
||||
}
|
||||
|
||||
/** Return true if the configuration of the managed proxy <b>mp</b> is
|
||||
|
||||
Reference in New Issue
Block a user