summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-05-13 12:12:53 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-13 12:12:53 -0400
commitd55db221e8ed993fa5cf4dd7bdaca62b1610d982 (patch)
tree210dd980c98fd2f5ae44adddfede23aefbbf6ebf /src/or/main.c
parent34451c7a453564f16194cf060444785fea2f971e (diff)
downloadtor-d55db221e8ed993fa5cf4dd7bdaca62b1610d982.tar.gz
tor-d55db221e8ed993fa5cf4dd7bdaca62b1610d982.zip
tor_tls_get_buffer_sizes() will not work on openssl 1.1. Patch from yawning
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/or/main.c b/src/or/main.c
index d0fe8cbc00..651291b57b 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2315,12 +2315,13 @@ dumpstats(int severity)
if (conn->type == CONN_TYPE_OR) {
or_connection_t *or_conn = TO_OR_CONN(conn);
if (or_conn->tls) {
- tor_tls_get_buffer_sizes(or_conn->tls, &rbuf_cap, &rbuf_len,
- &wbuf_cap, &wbuf_len);
- tor_log(severity, LD_GENERAL,
- "Conn %d: %d/%d bytes used on OpenSSL read buffer; "
- "%d/%d bytes used on write buffer.",
- i, (int)rbuf_len, (int)rbuf_cap, (int)wbuf_len, (int)wbuf_cap);
+ if (tor_tls_get_buffer_sizes(or_conn->tls, &rbuf_cap, &rbuf_len,
+ &wbuf_cap, &wbuf_len) == 0) {
+ tor_log(severity, LD_GENERAL,
+ "Conn %d: %d/%d bytes used on OpenSSL read buffer; "
+ "%d/%d bytes used on write buffer.",
+ i, (int)rbuf_len, (int)rbuf_cap, (int)wbuf_len, (int)wbuf_cap);
+ }
}
}
}