mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Allow interwined {Client,Server}TransportPlugin lines.
This commit is contained in:
parent
a002f0e7c0
commit
9bf34eb65b
@ -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>.
|
/** Return a managed proxy with the same argv as <b>proxy_argv</b>.
|
||||||
* If no such managed proxy exists, return NULL. */
|
* If no such managed proxy exists, return NULL. */
|
||||||
static managed_proxy_t *
|
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)
|
if (!managed_proxy_list)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
SMARTLIST_FOREACH_BEGIN(managed_proxy_list, managed_proxy_t *, mp) {
|
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;
|
return mp;
|
||||||
} SMARTLIST_FOREACH_END(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;
|
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 */
|
if (!mp) { /* we haven't seen this proxy before */
|
||||||
managed_proxy_create(transport, proxy_argv, is_server);
|
managed_proxy_create(transport, proxy_argv, is_server);
|
||||||
|
Loading…
Reference in New Issue
Block a user