summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-09-09 10:28:12 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-09 10:28:12 -0400
commit4c55e8a58f41933e76bcb309206c98e7b5a1d834 (patch)
treedc806fb333a97fa1e6891fd3ca725e2ae8d8e05f /src/common
parent2fe7e3d9d214b5cd7883ce83e5b11e14b02c5973 (diff)
downloadtor-4c55e8a58f41933e76bcb309206c98e7b5a1d834.tar.gz
tor-4c55e8a58f41933e76bcb309206c98e7b5a1d834.zip
Fix cases where the tests were doing closesocket() on a non-socket
These seem to have caused warnings on windows. Hmmm.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.c4
-rw-r--r--src/common/compat.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 5385bd871c..3fde2b3089 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1110,8 +1110,8 @@ tor_close_socket_simple(tor_socket_t s)
/** As tor_close_socket_simple(), but keeps track of the number
* of open sockets. Returns 0 on success, -1 on failure. */
-int
-tor_close_socket(tor_socket_t s)
+MOCK_IMPL(int,
+tor_close_socket,(tor_socket_t s))
{
int r = tor_close_socket_simple(s);
diff --git a/src/common/compat.h b/src/common/compat.h
index 12f280d2e9..ee1c9454de 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -478,7 +478,7 @@ typedef int socklen_t;
#endif
int tor_close_socket_simple(tor_socket_t s);
-int tor_close_socket(tor_socket_t s);
+MOCK_DECL(int, tor_close_socket, (tor_socket_t s));
tor_socket_t tor_open_socket_with_extensions(
int domain, int type, int protocol,
int cloexec, int nonblock);