summaryrefslogtreecommitdiff
path: root/src/core/network-openssl.c
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@irssi.org>2009-09-02 20:55:13 +0000
committerjilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564>2009-09-02 20:55:13 +0000
commitcb68d5f4e6e4423ef91197c575d2114bc89f11c8 (patch)
tree0c5c5ca8ab2521bb76301670a9e882d63ce0ed42 /src/core/network-openssl.c
parent3c30196ad4b7109c53611fe5017f832ccaa27973 (diff)
downloadirssi-cb68d5f4e6e4423ef91197c575d2114bc89f11c8.zip
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
Diffstat (limited to 'src/core/network-openssl.c')
-rw-r--r--src/core/network-openssl.c3
1 files changed, 3 insertions, 0 deletions
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;