diff options
author | Azat Khuzhin <azat@libevent.org> | 2020-07-22 23:08:50 +0300 |
---|---|---|
committer | Azat Khuzhin <azat@libevent.org> | 2020-07-22 23:08:50 +0300 |
commit | 5671575a1c2a8dba719a33464673b2a75d3877ea (patch) | |
tree | 68a7e79faf06573c45f54f1e6aa00f7b4f0c76b5 /bufferevent_openssl.c | |
parent | e1cdf1a182ca2cd3b8e1b9b78d2cc133cb489476 (diff) | |
download | libevent-5671575a1c2a8dba719a33464673b2a75d3877ea.tar.gz |
Join le_ssl_ops.post_init with le_ssl_ops.init
Diffstat (limited to 'bufferevent_openssl.c')
-rw-r--r-- | bufferevent_openssl.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c index a88ae891..c50c022d 100644 --- a/bufferevent_openssl.c +++ b/bufferevent_openssl.c @@ -322,6 +322,10 @@ decrement_buckets(struct bufferevent_ssl *bev_ssl) static void * SSL_init(void *ssl) { + /* Don't explode if we decide to realloc a chunk we're writing from in + * the output buffer. */ + SSL_set_mode(ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); + return ssl; } @@ -350,14 +354,6 @@ SSL_is_want_write(int err) return err == SSL_ERROR_WANT_WRITE; } -static void -be_openssl_post_init(void *ssl) -{ - /* Don't explode if we decide to realloc a chunk we're writing from in - * the output buffer. */ - SSL_set_mode(ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); -} - static int openssl_read(void *ssl, unsigned char *buf, size_t len) { @@ -415,7 +411,6 @@ static struct le_ssl_ops le_openssl_ops = { SSL_is_want_write, (int (*)(void *))be_openssl_get_fd, be_openssl_bio_set_fd, - be_openssl_post_init, init_bio_counts, decrement_buckets, conn_closed, |