diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-28 05:48:02 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-28 05:48:02 +0000 |
commit | f77ff938b7774d45f106b0fa9d6b6a8bab176b72 (patch) | |
tree | e19b4d1ea291556c8e0d5e826b338df52f42d330 /src/common | |
parent | 9449ff73368974db10ae05c64b13a9ff0a02f25f (diff) | |
download | tor-f77ff938b7774d45f106b0fa9d6b6a8bab176b72.tar.gz tor-f77ff938b7774d45f106b0fa9d6b6a8bab176b72.zip |
remember; tor_socket_errno has side effects!
svn:r2997
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 5b70ad7dbf..4cf481fba5 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -582,6 +582,10 @@ void tor_mutex_release(tor_mutex_t *m) * get your errors from WSAGetLastError, not errno. (If you supply a * socket of -1, we check WSAGetLastError, but don't correct * WSAEWOULDBLOCKs.) + * + * The upshot of all of this is that when a socket call fails, you + * should call tor_socket_errno <em>at most once</em> on the failing + * socket to get the error. */ #ifdef MS_WINDOWS int tor_socket_errno(int sock) |