aboutsummaryrefslogtreecommitdiff
path: root/src/or/transports.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@gmail.com>2011-09-11 20:30:08 +0200
committerGeorge Kadianakis <desnacked@gmail.com>2011-09-11 20:30:08 +0200
commit9bf34eb65b9533bf9a53952acf2994b9ee973ff2 (patch)
tree9e44b377925310c52eebe39a5fed3a53391e7866 /src/or/transports.c
parenta002f0e7c09dc664148a018fc69ac416789330dd (diff)
downloadtor-9bf34eb65b9533bf9a53952acf2994b9ee973ff2.tar.gz
tor-9bf34eb65b9533bf9a53952acf2994b9ee973ff2.zip
Allow interwined {Client,Server}TransportPlugin lines.
Diffstat (limited to 'src/or/transports.c')
-rw-r--r--src/or/transports.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/transports.c b/src/or/transports.c
index 7d483a36d1..91ff5184a7 100644
--- a/src/or/transports.c
+++ b/src/or/transports.c
@@ -163,13 +163,14 @@ managed_proxy_has_argv(managed_proxy_t *mp, char **proxy_argv)
/** Return a managed proxy with the same argv as <b>proxy_argv</b>.
* If no such managed proxy exists, return NULL. */
static managed_proxy_t *
-get_managed_proxy_by_argv(char **proxy_argv)
+get_managed_proxy_by_argv_and_type(char **proxy_argv, int is_server)
{
if (!managed_proxy_list)
return NULL;
SMARTLIST_FOREACH_BEGIN(managed_proxy_list, managed_proxy_t *, mp) {
- if (managed_proxy_has_argv(mp, proxy_argv))
+ if (managed_proxy_has_argv(mp, proxy_argv) &&
+ mp->is_server == is_server)
return mp;
} SMARTLIST_FOREACH_END(mp);
@@ -891,7 +892,7 @@ pt_kickstart_proxy(const char *transport, char **proxy_argv, int is_server)
{
managed_proxy_t *mp=NULL;
- mp = get_managed_proxy_by_argv(proxy_argv);
+ mp = get_managed_proxy_by_argv_and_type(proxy_argv, is_server);
if (!mp) { /* we haven't seen this proxy before */
managed_proxy_create(transport, proxy_argv, is_server);