From cb68d5f4e6e4423ef91197c575d2114bc89f11c8 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Wed, 2 Sep 2009 20:55:13 +0000 Subject: [PATCH] Tell OpenSSL that our write buffer may move (although the content remains the same). This fixes disconnects when sending large amounts of data to the server. Note that it assumes that write retries will retry the same data; a reasonable assumption, but it is not necessary for any normal write(). git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5095 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/network-openssl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index f78a4978..92832ba2 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -317,6 +317,9 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, const char *mycer return NULL; } + SSL_set_mode(ssl, SSL_MODE_ENABLE_PARTIAL_WRITE | + SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); + chan = g_new0(GIOSSLChannel, 1); chan->fd = fd; chan->giochan = handle;