aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/circuit.c2
-rw-r--r--src/or/connection.c4
-rw-r--r--src/or/connection_edge.c2
-rw-r--r--src/or/directory.c2
-rw-r--r--src/or/dns.c2
-rw-r--r--src/or/routerlist.c42
-rw-r--r--src/or/test.c2
-rw-r--r--src/or/tree.h2
8 files changed, 29 insertions, 29 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index 9577af8a0..a0d29cd1a 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -1152,7 +1152,7 @@ static void circuit_failed(circuit_t *circ) {
break;
case CIRCUIT_PURPOSE_S_CONNECT_REND:
/* at Bob, connecting to rend point */
- //
+ //
break;
}
}
diff --git a/src/or/connection.c b/src/or/connection.c
index 471528a49..25b6a8b04 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -247,7 +247,7 @@ void connection_expire_held_open(void)
if (conn->hold_open_until_flushed) {
assert(conn->marked_for_close);
if (now - conn->timestamp_lastwritten >= 15) {
- log_fn(LOG_WARN,"Giving up on marked_for_close conn that's been flushing for 15s (fd %d, type %s, state %d).",
+ log_fn(LOG_WARN,"Giving up on marked_for_close conn that's been flushing for 15s (fd %d, type %s, state %d).",
conn->s, CONN_TYPE_TO_STRING(conn->type), conn->state);
conn->hold_open_until_flushed = 0;
}
@@ -449,7 +449,7 @@ int retry_all_connections(void) {
if(options.DirPort) {
listener_close_if_present(CONN_TYPE_DIR_LISTENER);
- if(connection_create_listener(options.DirBindAddress,
+ if(connection_create_listener(options.DirBindAddress,
(uint16_t) options.DirPort,
CONN_TYPE_DIR_LISTENER) < 0)
return -1;
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 23c9c9d5d..1f74c11dd 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1158,7 +1158,7 @@ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {
log_fn(LOG_INFO,"Resolve failed (%s).", n_stream->address);
/* Set the state so that we don't try to remove n_stream from a DNS
* pending list. */
- n_stream->state = EXIT_CONN_STATE_RESOLVEFAILED;
+ n_stream->state = EXIT_CONN_STATE_RESOLVEFAILED;
connection_mark_for_close(n_stream, END_STREAM_REASON_RESOLVEFAILED);
break;
case 0: /* resolve added to pending list */
diff --git a/src/or/directory.c b/src/or/directory.c
index 646e73774..dacf47935 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -91,7 +91,7 @@ void directory_initiate_command(routerinfo_t *router, int purpose,
return;
}
- conn->state = DIR_CONN_STATE_CLIENT_SENDING;
+ conn->state = DIR_CONN_STATE_CLIENT_SENDING;
connection_set_poll_socket(conn);
connection_start_reading(conn);
}
diff --git a/src/or/dns.c b/src/or/dns.c
index 4c4ea7a66..36bdefeec 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -364,7 +364,7 @@ static void dns_found_answer(char *address, uint32_t addr, char outcome) {
pend->conn->addr = resolve->addr;
if(resolve->state == CACHE_STATE_FAILED) {
/* prevent double-remove */
- pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED;
+ pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED;
pendconn = pend->conn; /* don't pass complex things to the
connection_mark_for_close macro */
connection_mark_for_close(pendconn, END_STREAM_REASON_RESOLVEFAILED);
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index e7f8cbce0..d37e5542b 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -123,7 +123,7 @@ static int router_get_hash_impl(const char *s, char *digest,
const char *start_str, const char *end_str);
static void token_free(directory_token_t *tok);
static smartlist_t *find_all_exitpolicy(smartlist_t *s);
-static directory_token_t *find_first_by_keyword(smartlist_t *s,
+static directory_token_t *find_first_by_keyword(smartlist_t *s,
directory_keyword keyword);
static int tokenize_string(const char *start, const char *end,
smartlist_t *out, int is_dir);
@@ -607,7 +607,7 @@ int router_exit_policy_all_routers_reject(uint32_t addr, uint16_t port) {
}
int router_exit_policy_rejects_all(routerinfo_t *router) {
- return router_compare_addr_to_exit_policy(0, 0, router->exit_policy)
+ return router_compare_addr_to_exit_policy(0, 0, router->exit_policy)
== ADDR_POLICY_REJECTED;
}
@@ -618,9 +618,9 @@ static int parse_time(const char *cp, time_t *t)
if (!strptime(cp, "%Y-%m-%d %H:%M:%S", &st_tm)) {
log_fn(LOG_WARN, "Published time was unparseable"); return -1;
}
-#else
+#else
unsigned int year=0, month=0, day=0, hour=100, minute=100, second=100;
- if (sscanf(cp, "%u-%u-%u %u:%u:%u", &year, &month,
+ if (sscanf(cp, "%u-%u-%u %u:%u:%u", &year, &month,
&day, &hour, &minute, &second) < 6) {
log_fn(LOG_WARN, "Published time was unparseable"); return -1;
}
@@ -645,7 +645,7 @@ static int parse_time(const char *cp, time_t *t)
* If pkey is provided, we check the directory signature with pkey.
*/
int /* Should be static; exposed for unit tests */
-router_get_routerlist_from_directory_impl(const char *str,
+router_get_routerlist_from_directory_impl(const char *str,
routerlist_t **dest,
crypto_pk_env_t *pkey)
{
@@ -690,7 +690,7 @@ router_get_routerlist_from_directory_impl(const char *str,
tok = smartlist_get(tokens,0);
if (tok->tp != K_SIGNED_DIRECTORY) {
- log_fn(LOG_WARN, "Directory doesn't start with signed-directory.");
+ log_fn(LOG_WARN, "Directory doesn't start with signed-directory.");
goto err;
}
@@ -699,7 +699,7 @@ router_get_routerlist_from_directory_impl(const char *str,
goto err;
}
assert(tok->n_args == 1);
-
+
if (parse_time(tok->args[0], &published_on) < 0) {
goto err;
}
@@ -712,10 +712,10 @@ router_get_routerlist_from_directory_impl(const char *str,
log_fn(LOG_WARN, "Invalid recommended-software line"); goto err;
}
versions = tor_strdup(tok->args[0]);
-
+
if (!(tok = find_first_by_keyword(tokens, K_RUNNING_ROUTERS))) {
log_fn(LOG_WARN, "Missing running-routers line from directory.");
- goto err;
+ goto err;
}
n_good_nicknames = tok->n_args;
@@ -751,7 +751,7 @@ router_get_routerlist_from_directory_impl(const char *str,
}
tok = smartlist_get(tokens,0);
if (strcmp(tok->object_type, "SIGNATURE") || tok->object_size != 128) {
- log_fn(LOG_WARN, "Bad object type or length on directory signature");
+ log_fn(LOG_WARN, "Bad object type or length on directory signature");
goto err;
}
if (pkey) {
@@ -930,8 +930,8 @@ routerinfo_t *router_get_entry_from_string(const char *s,
} else {
log_fn(LOG_WARN,"Wrong # of arguments to \"router\"");
goto err;
- }
-
+ }
+
tok = find_first_by_keyword(tokens, K_PORTS);
if (tok && ports_set) {
log_fn(LOG_WARN,"Redundant ports line");
@@ -946,7 +946,7 @@ routerinfo_t *router_get_entry_from_string(const char *s,
router->dir_port = atoi(tok->args[2]);
ports_set = 1;
}
-
+
tok = find_first_by_keyword(tokens, K_BANDWIDTH);
if (tok && bw_set) {
log_fn(LOG_WARN,"Redundant bandwidth line");
@@ -1041,7 +1041,7 @@ routerinfo_t *router_get_entry_from_string(const char *s,
goto done;
return router;
-
+
err:
routerinfo_free(router);
router = NULL;
@@ -1098,7 +1098,7 @@ router_add_exit_policy_from_string(routerinfo_t *router, const char *s)
/* Given a K_ACCEPT or K_REJECT token and a router, create a new exit_policy_t
* corresponding to the token, and add it to 'router' */
-static int
+static int
router_add_exit_policy(routerinfo_t *router, directory_token_t *tok) {
struct exit_policy_t *tmpe, *newe;
@@ -1256,7 +1256,7 @@ get_next_token(const char **s, where_syntax where) {
tok->tp = _ERR; \
tok->error = msg; \
goto done_tokenizing; } while (0)
-
+
tok = tor_malloc_zero(sizeof(directory_token_t));
tok->tp = _ERR;
@@ -1264,7 +1264,7 @@ get_next_token(const char **s, where_syntax where) {
if (!**s) {
tok->tp = _EOF;
return tok;
- }
+ }
next = find_whitespace(*s);
if (!next) {
tok->error = "Unexpected EOF"; return tok;
@@ -1394,7 +1394,7 @@ get_next_token(const char **s, where_syntax where) {
case OBJ_OK:
break;
}
-
+
done_tokenizing:
#if 0
@@ -1423,8 +1423,8 @@ get_next_token(const char **s, where_syntax where) {
#undef RET_ERR
}
-static int
-tokenize_string(const char *start, const char *end, smartlist_t *out,
+static int
+tokenize_string(const char *start, const char *end, smartlist_t *out,
int is_dir)
{
const char **s;
@@ -1440,7 +1440,7 @@ tokenize_string(const char *start, const char *end, smartlist_t *out,
smartlist_add(out, tok);
*s = eat_whitespace(*s);
}
-
+
return 0;
}
diff --git a/src/or/test.c b/src/or/test.c
index 11b539253..34e3dd3af 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -608,7 +608,7 @@ void test_onion() {
char **names;
int i,num;
- names = parse_nickname_list(" foo bar baz quux ", &num);
+ names = parse_nickname_list(" foo bar\t baz quux ", &num);
test_eq(num,4);
test_streq(names[0],"foo");
test_streq(names[1],"bar");
diff --git a/src/or/tree.h b/src/or/tree.h
index 927ca04cd..7b4f6a0ee 100644
--- a/src/or/tree.h
+++ b/src/or/tree.h
@@ -83,7 +83,7 @@ struct { \
SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
(head)->sph_root = tmp; \
} while (0)
-
+
#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
SPLAY_LEFT(tmp, field) = (head)->sph_root; \