[or-cvs] complain when we hit wsaenobufs on recv or write too.
arma at seul.org
arma at seul.org
Sat Apr 8 07:54:14 UTC 2006
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
buffers.c
Log Message:
complain when we hit wsaenobufs on recv or write too.
perhaps this will help us hunt the bug.
Index: buffers.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -p -d -r1.190 -r1.191
--- buffers.c 19 Mar 2006 01:44:53 -0000 1.190
+++ buffers.c 8 Apr 2006 07:54:11 -0000 1.191
@@ -402,6 +402,10 @@ read_to_buf_impl(int s, size_t at_most,
if (read_result < 0) {
int e = tor_socket_errno(s);
if (!ERRNO_IS_EAGAIN(e)) { /* it's a real error */
+#ifdef MS_WINDOWS
+ if (e == WSAENOBUFS)
+ log_warn(LD_NET,"recv() failed: WSAENOBUFS. Not enough ram?");
+#endif
return -1;
}
return 0; /* would block. */
@@ -572,6 +576,10 @@ flush_buf_impl(int s, buf_t *buf, size_t
if (write_result < 0) {
int e = tor_socket_errno(s);
if (!ERRNO_IS_EAGAIN(e)) { /* it's a real error */
+#ifdef MS_WINDOWS
+ if (e == WSAENOBUFS)
+ log_warn(LD_NET,"write() failed: WSAENOBUFS. Not enough ram?");
+#endif
return -1;
}
log_debug(LD_NET,"write() would block, returning.");
More information about the tor-commits
mailing list