diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-02-06 15:42:53 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-02-06 15:42:53 -0500 |
commit | e36faeec1d40e1f4f7ae54c798ad4492f86f594c (patch) | |
tree | e2a61fc6d4fcb09fa6aeb1db652f9575e816acea /src | |
parent | b3bc8712140b8268cb3714b17b9678eefe66e90e (diff) | |
parent | e0c3de40ad557be4ed059e93695391e44aa7a16c (diff) | |
download | tor-e36faeec1d40e1f4f7ae54c798ad4492f86f594c.tar.gz tor-e36faeec1d40e1f4f7ae54c798ad4492f86f594c.zip |
Merge remote-tracking branch 'sebastian/bug13993'
Diffstat (limited to 'src')
-rw-r--r-- | src/common/log.c | 6 | ||||
-rw-r--r-- | src/or/connection.c | 4 | ||||
-rw-r--r-- | src/or/control.c | 6 | ||||
-rw-r--r-- | src/test/test.c | 3 | ||||
-rw-r--r-- | src/test/test_dir.c | 1 |
5 files changed, 13 insertions, 7 deletions
diff --git a/src/common/log.c b/src/common/log.c index bbad7f1dac..e8cc30c312 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -1062,6 +1062,12 @@ flush_log_messages_from_startup(void) if (! logfile_wants_message(lf, msg->severity, msg->domain)) continue; + /* We configure a temporary startup log that goes to stdout, so we + * shouldn't replay to stdout/stderr*/ + if (lf->fd == STDOUT_FILENO || lf->fd == STDERR_FILENO) { + continue; + } + logfile_deliver(lf, msg->fullmsg, strlen(msg->fullmsg), msg->msg, msg->domain, msg->severity, &callbacks_deferred); } diff --git a/src/or/connection.c b/src/or/connection.c index 0ce4f72209..79ae178a56 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -1601,7 +1601,6 @@ connection_init_accepted_conn(connection_t *conn, return 0; } - static int connection_connect_sockaddr(connection_t *conn, const struct sockaddr *sa, @@ -1688,11 +1687,10 @@ connection_connect_sockaddr(connection_t *conn, *socket_error = SOCK_ERRNO(ENOBUFS); return -1; } - return inprogress ? 0 : 1; + return inprogress ? 0 : 1; } - /** Take conn, make a nonblocking socket; try to connect to * addr:port (they arrive in *host order*). If fail, return -1 and if * applicable put your best guess about errno into *<b>socket_error</b>. diff --git a/src/or/control.c b/src/or/control.c index 24e1479b50..064b745c9f 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1886,13 +1886,15 @@ circuit_describe_status_for_controller(origin_circuit_t *circ) if (circ->socks_username_len > 0) { char* socks_username_escaped = esc_for_log_len(circ->socks_username, (size_t) circ->socks_username_len); - smartlist_add_asprintf(descparts, "SOCKS_USERNAME=%s", socks_username_escaped); + smartlist_add_asprintf(descparts, "SOCKS_USERNAME=%s", + socks_username_escaped); tor_free(socks_username_escaped); } if (circ->socks_password_len > 0) { char* socks_password_escaped = esc_for_log_len(circ->socks_password, (size_t) circ->socks_password_len); - smartlist_add_asprintf(descparts, "SOCKS_PASSWORD=%s", socks_password_escaped); + smartlist_add_asprintf(descparts, "SOCKS_PASSWORD=%s", + socks_password_escaped); tor_free(socks_password_escaped); } diff --git a/src/test/test.c b/src/test/test.c index 7995af3c69..78932a4b7a 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -106,7 +106,8 @@ test_onion_handshake(void *arg) /* client handshake 2 */ memset(c_keys, 0, 40); - tt_assert(! onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, 40, NULL)); + tt_assert(! onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, + 40, NULL)); tt_mem_op(c_keys,OP_EQ, s_keys, 40); memset(s_buf, 0, 40); diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 849bbdbef6..a949f5de73 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -3079,7 +3079,6 @@ test_dir_packages(void *arg) ADD(2, "cbc 99.1.11.1.2 http://example.com/ cubehash=ahooy"); ADD(2, "cbc 99.1.11.1.2 http://example.com/ cubehash=ahooy"); - res = compute_consensus_package_lines(votes); tt_assert(res); tt_str_op(res, ==, |