From 9bf34eb65b9533bf9a53952acf2994b9ee973ff2 Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Sun, 11 Sep 2011 20:30:08 +0200 Subject: [PATCH] Allow interwined {Client,Server}TransportPlugin lines. --- src/or/transports.c | 7 ++++--- 1 file 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 proxy_argv. * 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);