summaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-10-18 12:14:30 -0400
committerNick Mathewson <nickm@torproject.org>2017-10-18 12:17:44 -0400
commit4eb5753bd29b24fd5a523499add35a6214293cd9 (patch)
tree29f6a7ff97740adcbd68065872202ac1ad6c17af /src/common/compat.h
parent5bcd8dc5c482da4da71402cd06b0ecc709f05493 (diff)
downloadtor-4eb5753bd29b24fd5a523499add35a6214293cd9.tar.gz
tor-4eb5753bd29b24fd5a523499add35a6214293cd9.zip
New function for Tor to treat itself as the "owner" of a socket
Our socket accounting functions assumed that we'd never be asked to close a socket that we didn't open ourselves. But now we want to support taking control sockets that we inherit -- so we need a way of taking ownership of them, so we don't freak out later on when we close them.
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index fee9e6587d..0aabee68c8 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -483,6 +483,7 @@ typedef int socklen_t;
int tor_close_socket_simple(tor_socket_t s);
MOCK_DECL(int, tor_close_socket, (tor_socket_t s));
+void tor_take_socket_ownership(tor_socket_t s);
tor_socket_t tor_open_socket_with_extensions(
int domain, int type, int protocol,
int cloexec, int nonblock);