[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Allow interwined {Client, Server}TransportPlugin lines.
commit 9bf34eb65b9533bf9a53952acf2994b9ee973ff2
Author: George Kadianakis <desnacked@xxxxxxxxx>
Date: Sun Sep 11 20:30:08 2011 +0200
Allow interwined {Client,Server}TransportPlugin lines.
---
src/or/transports.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/or/transports.c b/src/or/transports.c
index 7d483a3..91ff518 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);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits