diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/tortls.c | 4 | ||||
-rw-r--r-- | src/common/tortls.h | 2 | ||||
-rw-r--r-- | src/common/util.c | 2 | ||||
-rw-r--r-- | src/common/util.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index bd7e95c033..63b40258c2 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -2092,8 +2092,8 @@ tor_tls_free(tor_tls_t *tls) * number of characters read. On failure, returns TOR_TLS_ERROR, * TOR_TLS_CLOSE, TOR_TLS_WANTREAD, or TOR_TLS_WANTWRITE. */ -int -tor_tls_read(tor_tls_t *tls, char *cp, size_t len) +MOCK_IMPL(int, +tor_tls_read,(tor_tls_t *tls, char *cp, size_t len)) { int r, err; tor_assert(tls); diff --git a/src/common/tortls.h b/src/common/tortls.h index f8c6d5913b..2aac8af18e 100644 --- a/src/common/tortls.h +++ b/src/common/tortls.h @@ -77,7 +77,7 @@ int tor_tls_verify(int severity, tor_tls_t *tls, crypto_pk_t **identity); int tor_tls_check_lifetime(int severity, tor_tls_t *tls, int past_tolerance, int future_tolerance); -int tor_tls_read(tor_tls_t *tls, char *cp, size_t len); +MOCK_DECL(int, tor_tls_read, (tor_tls_t *tls, char *cp, size_t len)); int tor_tls_write(tor_tls_t *tls, const char *cp, size_t n); int tor_tls_handshake(tor_tls_t *tls); int tor_tls_finish_handshake(tor_tls_t *tls); diff --git a/src/common/util.c b/src/common/util.c index f8d1b7be4b..942d0c290e 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -3555,7 +3555,7 @@ finish_daemon(const char *cp) /** Write the current process ID, followed by NL, into <b>filename</b>. */ void -write_pidfile(char *filename) +write_pidfile(const char *filename) { FILE *pidfile; diff --git a/src/common/util.h b/src/common/util.h index 30ac248b30..ac4ebfc6f3 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -418,7 +418,7 @@ int path_is_relative(const char *filename); /* Process helpers */ void start_daemon(void); void finish_daemon(const char *desired_cwd); -void write_pidfile(char *filename); +void write_pidfile(const char *filename); /* Port forwarding */ void tor_check_port_forwarding(const char *filename, |