mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -41,6 +41,7 @@ int tor_tls_write(tor_tls_t *tls, char *cp, size_t n);
|
||||
int tor_tls_handshake(tor_tls_t *tls);
|
||||
int tor_tls_shutdown(tor_tls_t *tls);
|
||||
int tor_tls_get_pending_bytes(tor_tls_t *tls);
|
||||
size_t tor_tls_get_forced_write_size(tor_tls_t *tls);
|
||||
|
||||
unsigned long tor_tls_get_n_bytes_read(tor_tls_t *tls);
|
||||
unsigned long tor_tls_get_n_bytes_written(tor_tls_t *tls);
|
||||
|
||||
Reference in New Issue
Block a user