1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

mail/nullmailer: Fix send fail on GnuTLS

PR:		237613
Submitted by:	David Hauweele <david@hauweele.net>
This commit is contained in:
Steve Wills 2019-05-30 01:47:53 +00:00
parent 808aebebc7
commit 123a7a969c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=503026
3 changed files with 29 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= nullmailer
PORTVERSION= 1.13
PORTREVISION= 3
PORTREVISION= 4
PORTEPOCH= 1
CATEGORIES= mail
MASTER_SITES= http://untroubled.org/nullmailer/ \

View File

@ -0,0 +1,14 @@
--- lib/fdbuf/tlsibuf.cc.orig
+++ lib/fdbuf/tlsibuf.cc
@@ -27,5 +27,10 @@
ssize_t tlsibuf::_read(char* buf, ssize_t len)
{
- return gnutls_record_recv(session, buf, len);
+ ssize_t rc;
+ do
+ {
+ rc = gnutls_record_recv(session, buf, len);
+ } while (rc == GNUTLS_E_AGAIN || rc == GNUTLS_E_INTERRUPTED);
+ return rc;
}

View File

@ -0,0 +1,14 @@
--- lib/fdbuf/tlsobuf.cc.orig
+++ lib/fdbuf/tlsobuf.cc
@@ -27,5 +27,10 @@
ssize_t tlsobuf::_write(const char* buf, ssize_t len)
{
- return gnutls_record_send(session, buf, len);
+ ssize_t rc;
+ do
+ {
+ rc = gnutls_record_send(session, buf, len);
+ } while(rc == GNUTLS_E_AGAIN || rc == GNUTLS_E_INTERRUPTED);
+ return rc;
}