diff options
author | Roger Dingledine <arma@torproject.org> | 2003-09-07 10:24:40 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-09-07 10:24:40 +0000 |
commit | 3fa170e11f10f62f88465fc7b05eead2537501e0 (patch) | |
tree | edd6c72b13a1dc23bcdd4f0dbadb9df7d10a56ba /src/or/buffers.c | |
parent | 99035f35205734b6c1736fe3aa5a12cb8beaca60 (diff) | |
download | tor-3fa170e11f10f62f88465fc7b05eead2537501e0.tar.gz tor-3fa170e11f10f62f88465fc7b05eead2537501e0.zip |
more futzing towards tls
not there yet
svn:r429
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index fa66aeb192..1c0c599148 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -129,6 +129,7 @@ int flush_buf(int s, char **buf, int *buflen, int *buf_flushlen, int *buf_datale // log_fn(LOG_DEBUG,"flushed %d bytes, %d ready to flush, %d remain.", // write_result,*buf_flushlen,*buf_datalen); return *buf_flushlen; + /* XXX USE_TLS should change to return write_result like any sane function would */ } } @@ -136,8 +137,9 @@ int flush_buf_tls(tor_tls *tls, char **buf, int *buflen, int *buf_flushlen, int { int r; assert(tls && *buf && buflen && buf_datalen); - if (*buf_flushlen == 0) - return 0; + + /* we want to let tls write even if flushlen is zero, because it might + * have a partial record pending */ r = tor_tls_write(tls, *buf, *buf_flushlen); if (r < 0) { return r; |