aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-12-13 22:46:42 +0000
committerNick Mathewson <nickm@torproject.org>2006-12-13 22:46:42 +0000
commit43e06eba8baab0fec003841f2fe6baafbe506e39 (patch)
treef2d7eae98ddc44dc1217ee4de00685a88cced18e /src/common/tortls.c
parent5cce710e2b86ffcaf3bad81b95ba94f26f1d2838 (diff)
downloadtor-43e06eba8baab0fec003841f2fe6baafbe506e39.tar
tor-43e06eba8baab0fec003841f2fe6baafbe506e39.tar.gz
r11566@Kushana: nickm | 2006-12-13 17:46:24 -0500
Try to fix an assert failure in new write limiting code: make buffers.c aware of previous "forced" write sizes from tortls. svn:r9105
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 7f601258c..51c4abe24 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -850,7 +850,14 @@ tor_tls_get_pending_bytes(tor_tls_t *tls)
return 0;
#endif
return SSL_pending(tls->ssl);
+}
+/** If <b>tls</b> requires that the next write be of a particular size,
+ * return that size. Otherwise, return 0. */
+size_t
+tor_tls_get_forced_write_size(tor_tls_t *tls)
+{
+ return tls->wantwrite_n;
}
/** Return the number of bytes read across the underlying socket. */