Make check-spaces happy.

This commit is contained in:
George Kadianakis
2011-09-11 23:34:36 +02:00
parent c6811c57cb
commit de7565f87f
5 changed files with 22 additions and 17 deletions
+4 -2
View File
@@ -3193,9 +3193,11 @@ tor_spawn_background(const char *const filename, int *stdout_read,
*
* Returns:
* IO_STREAM_CLOSED: If the stream is closed.
* IO_STREAM_EAGAIN: If there is nothing to read and we should check back later.
* IO_STREAM_EAGAIN: If there is nothing to read and we should check back
* later.
* IO_STREAM_TERM: If something is wrong with the stream.
* IO_STREAM_OKAY: If everything went okay and we got a string in <b>buf_out</b>. */
* IO_STREAM_OKAY: If everything went okay and we got a string
* in <b>buf_out</b>. */
enum stream_status
get_string_from_pipe(FILE *stream, char *buf_out, size_t count)
{
+5 -5
View File
@@ -4695,15 +4695,15 @@ transport_resolve_conflicts(transport_t *t)
} else { /* same name but different addrport */
if (t_tmp->marked_for_removal) { /* marked for removal */
log_warn(LD_GENERAL, "You tried to add transport '%s' at '%s:%u' but "
"there was already a transport marked for deletion at '%s:%u'."
"We deleted the old transport and registered the new one.",
t->name, fmt_addr(&t->addr), t->port,
"there was already a transport marked for deletion at "
"'%s:%u'. We deleted the old transport and registered the "
"new one.", t->name, fmt_addr(&t->addr), t->port,
fmt_addr(&t_tmp->addr), t_tmp->port);
smartlist_remove(transport_list, t_tmp);
transport_free(t_tmp);
} else { /* *not* marked for removal */
log_warn(LD_GENERAL, "You tried to add transport '%s' at '%s:%u' which "
"already exists at '%s:%u'. Skipping.", t->name,
log_warn(LD_GENERAL, "You tried to add transport '%s' at '%s:%u' "
"which already exists at '%s:%u'. Skipping.", t->name,
fmt_addr(&t->addr), t->port,
fmt_addr(&t_tmp->addr), t_tmp->port);
return -1;
+5 -4
View File
@@ -1245,7 +1245,6 @@ options_act(or_options_t *old_options)
rep_hist_load_mtbf_data(time(NULL));
}
mark_transport_list();
pt_prepare_proxy_list_for_config_read();
if (options->ClientTransportPlugin) {
@@ -5892,11 +5891,13 @@ save_transport_to_state(const char *transport,
/* if transport in state has the same address as this one, life is good */
if (!strcmp(prev_bindaddr, transport_addrport)) {
log_warn(LD_CONFIG, "Transport seems to have spawned on its usual address:port.");
log_warn(LD_CONFIG, "Transport seems to have spawned on its usual "
"address:port.");
goto done;
} else { /* addrport in state is different than the one we got */
log_warn(LD_CONFIG, "Transport seems to have spawned on different address:port."
"Let's update the state file with the new address:port");
log_warn(LD_CONFIG, "Transport seems to have spawned on different "
"address:port. Let's update the state file with the new "
"address:port");
tor_free(transport_line->value); /* free the old line */
tor_asprintf(&transport_line->value, "%s %s:%d", transport,
fmt_addr(addr),
+6 -5
View File
@@ -13,7 +13,8 @@
#include "transports.h"
#include "util.h"
static void set_managed_proxy_environment(char ***envp, const managed_proxy_t *mp);
static void set_managed_proxy_environment(char ***envp,
const managed_proxy_t *mp);
static INLINE int proxy_configuration_finished(const managed_proxy_t *mp);
static void managed_proxy_destroy(managed_proxy_t *mp);
@@ -495,7 +496,6 @@ proxy_configuration_finished(const managed_proxy_t *mp)
mp->conf_state == PT_PROTO_BROKEN);
}
/** This function is called when a proxy sends an {S,C}METHODS DONE message. */
static void
handle_methods_done(const managed_proxy_t *mp)
@@ -863,10 +863,12 @@ set_managed_proxy_environment(char ***envp, const managed_proxy_t *mp)
if (mp->is_server) {
bindaddr = get_bindaddr_for_proxy(mp);
tor_asprintf(tmp++, "TOR_PT_ORPORT=127.0.0.1:%d", options->ORPort); /* XXX temp */
/* XXX temp */
tor_asprintf(tmp++, "TOR_PT_ORPORT=127.0.0.1:%d", options->ORPort);
tor_asprintf(tmp++, "TOR_PT_SERVER_BINDADDR=%s", bindaddr);
tor_asprintf(tmp++, "TOR_PT_SERVER_TRANSPORTS=%s", transports_to_launch);
tor_asprintf(tmp++, "TOR_PT_EXTENDED_SERVER_PORT=127.0.0.1:4200"); /* XXX temp*/
/* XXX temp*/
tor_asprintf(tmp++, "TOR_PT_EXTENDED_SERVER_PORT=127.0.0.1:4200");
} else {
tor_asprintf(tmp++, "TOR_PT_CLIENT_TRANSPORTS=%s", transports_to_launch);
}
@@ -952,7 +954,6 @@ free_execve_args(char **arg)
tor_free(arg);
}
/** Tor will read its config, prepare the managed proxy list so that
* proxies that are not used in the new config will shutdown, and
* proxies that need to spawn more transports will do so. */
+2 -1
View File
@@ -63,7 +63,8 @@ typedef struct {
* torrc. */
unsigned int got_hup : 1;
smartlist_t *transports_to_launch; /* transports to-be-launched by this proxy */
/* transports to-be-launched by this proxy */
smartlist_t *transports_to_launch;
/* The 'transports' list contains all the transports this proxy has
launched.