aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2013-07-29 16:01:10 +0200
committerNick Mathewson <nickm@torproject.org>2013-07-31 13:34:16 -0400
commit99bb6d2937a76caf7d6085fb063d89c1c8b3d9b6 (patch)
tree015339f8bf2d64caecca2cbdd017e047e98969da
parentaaf79eb4d334fb5e1f98d0a68b3a30dde983325a (diff)
downloadtor-99bb6d2937a76caf7d6085fb063d89c1c8b3d9b6.tar
tor-99bb6d2937a76caf7d6085fb063d89c1c8b3d9b6.tar.gz
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.
-rw-r--r--src/or/transports.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/transports.c b/src/or/transports.c
index 3aced21b3..0bd024fab 100644
--- a/src/or/transports.c
+++ b/src/or/transports.c
@@ -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