summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-28 05:48:02 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-28 05:48:02 +0000
commitf77ff938b7774d45f106b0fa9d6b6a8bab176b72 (patch)
treee19b4d1ea291556c8e0d5e826b338df52f42d330 /src/common
parent9449ff73368974db10ae05c64b13a9ff0a02f25f (diff)
downloadtor-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.c4
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)