summaryrefslogtreecommitdiff
path: root/src/or/buffers.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-03-11 06:19:08 +0000
committerNick Mathewson <nickm@torproject.org>2004-03-11 06:19:08 +0000
commit9b4203266e7e0e7d162bde0063281d0ab6e0b415 (patch)
treef8e81d34b49dca09d622fcb1efee4914d8c6d26e /src/or/buffers.c
parent59e2c77824840f8cd5706c4ae660bc7f50bab0f1 (diff)
downloadtor-9b4203266e7e0e7d162bde0063281d0ab6e0b415.tar.gz
tor-9b4203266e7e0e7d162bde0063281d0ab6e0b415.zip
Make OP work on windows! (Also misc logging tweaks)
svn:r1258
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r--src/or/buffers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 1ddf9d349d..d42350b229 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -188,7 +188,7 @@ int read_to_buf(int s, int at_most, buf_t *buf, int *reached_eof) {
return 0; /* we shouldn't read anything */
// log_fn(LOG_DEBUG,"reading at most %d bytes.",at_most);
- read_result = read(s, buf->mem+buf->datalen, at_most);
+ read_result = recv(s, buf->mem+buf->datalen, at_most, 0);
if (read_result < 0) {
if(!ERRNO_EAGAIN(errno)) { /* it's a real error */
return -1;
@@ -250,7 +250,7 @@ int flush_buf(int s, buf_t *buf, int *buf_flushlen)
if(*buf_flushlen == 0) /* nothing to flush */
return 0;
- write_result = write(s, buf->mem, *buf_flushlen);
+ write_result = send(s, buf->mem, *buf_flushlen, 0);
if (write_result < 0) {
if(!ERRNO_EAGAIN(errno)) { /* it's a real error */
return -1;