sweep_bridge_list();
}
- /* If we have pluggable transport related options enabled, see if we
- should warn the user about potential configuration problems. */
- if (options->Bridges || options->ClientTransportPlugin)
- validate_pluggable_transports_config();
-
if (running_tor && rend_config_services(options, 0)<0) {
log_warn(LD_BUG,
"Previously validated hidden services line could not be added!");
sweep_transport_list();
sweep_proxy_list();
+ /* If we have pluggable transport related options enabled, see if we
+ should warn the user about potential configuration problems. */
+ if (options->Bridges || options->ClientTransportPlugin)
+ validate_pluggable_transports_config();
+
/* Bail out at this point if we're not going to be a client or server:
* we want to not fork, and to log stuff to stderr. */
if (!running_tor)
/** Return string containing the address:port part of the
* TransportProxy <b>line</b> for transport <b>transport</b>.
* If the line is corrupted, return NULL. */
-const char *
+static const char *
get_transport_bindaddr(const char *line, const char *transport)
{
char *line_tmp = NULL;
#include "transports.h"
#include "util.h"
-/* ASN TIDY THESE UP*/
static void set_managed_proxy_environment(char ***envp, const managed_proxy_t *mp);
static INLINE int proxy_configuration_finished(const managed_proxy_t *mp);
tor_assert(mp->conf_state != PT_PROTO_COMPLETED);
SMARTLIST_FOREACH_BEGIN(mp->transports, transport_t *, t) {
- save_transport_to_state(t->name,&t->addr,t->port); /* pass tor_addr_t? */
+ save_transport_to_state(t->name, &t->addr, t->port);
smartlist_add(sm_tmp, tor_strdup(t->name));
} SMARTLIST_FOREACH_END(t);
+ /* Since server proxies don't register their transports in the
+ circuitbuild.c subsystem, it's our duty to free them when we
+ switch mp->transports to strings. */
+ SMARTLIST_FOREACH(mp->transports, transport_t *, t, transport_free(t));
smartlist_free(mp->transports);
+
mp->transports = sm_tmp;
}
SMARTLIST_FOREACH(mp->transports_to_launch, char *, t, tor_free(t));
/* free the transports smartlist */
- smartlist_clear(mp->transports_to_launch);
smartlist_free(mp->transports_to_launch);
/* remove it from the list of managed proxies */
register_proxy(mp); /* register transports */
mp->conf_state = PT_PROTO_COMPLETED; /* mark it as completed. */
break;
+ case PT_PROTO_INFANT:
+ case PT_PROTO_LAUNCHED:
+ case PT_PROTO_ACCEPTING_METHODS:
+ case PT_PROTO_COMPLETED:
default:
- log_warn(LD_CONFIG, "Unfinished managed proxy in "
+ log_warn(LD_CONFIG, "Unexpected managed proxy state in "
"handle_finished_proxy().");
tor_assert(0);
}
pt_kickstart_proxy(const char *transport, char **proxy_argv, int is_server)
{
managed_proxy_t *mp=NULL;
+ transport_t *old_transport = NULL;
mp = get_managed_proxy_by_argv_and_type(proxy_argv, is_server);
unconfigured_proxies_n++;
}
- transport_t *old_transport = NULL;
old_transport = transport_get_by_name(transport);
if (old_transport)
old_transport->marked_for_removal = 0;