summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-20 09:18:05 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-20 16:39:51 +0200
commite800713cf7c207ff4b0ecac4e06dfa46bce8027b (patch)
treee45bfcbccbfe2415099945eafa2f6dabc29381ef
parent0a1b5366ca26adf9dd41165c820967aae1b80b28 (diff)
downloadgnutls-e800713cf7c207ff4b0ecac4e06dfa46bce8027b.tar.gz
pull/push backends: ECONNRESET is translated to GNUTLS_E_PREMATURE_TERMINATION
This returns a more reasonable error code on platforms where this errno is set. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r--lib/buffers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/buffers.c b/lib/buffers.c
index abe4db840e..8b85c6398d 100644
--- a/lib/buffers.c
+++ b/lib/buffers.c
@@ -224,6 +224,8 @@ int errno_to_gerr(int err, unsigned dtls)
return GNUTLS_E_LARGE_PACKET;
else
return GNUTLS_E_PUSH_ERROR;
+ case ECONNRESET:
+ return GNUTLS_E_PREMATURE_TERMINATION;
default:
gnutls_assert();
return GNUTLS_E_PUSH_ERROR;