summaryrefslogtreecommitdiff
path: root/lib/gnutls_buffers.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-09-02 10:36:12 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-09-02 10:36:12 +0200
commit43e14e8a5cef27f319316bb7ff0de8b86272ac99 (patch)
tree3d7e409dbaad6f5559dbea17b805e4235d0d4b2c /lib/gnutls_buffers.c
parent6fb9a10025a9453202a0836ead8e35e246d0213f (diff)
downloadgnutls-43e14e8a5cef27f319316bb7ff0de8b86272ac99.tar.gz
use errno_to_gerr() in _gnutls_io_check_recv().
Diffstat (limited to 'lib/gnutls_buffers.c')
-rw-r--r--lib/gnutls_buffers.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index c71451953e..44b09cbf86 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -663,13 +663,9 @@ _gnutls_io_check_recv (gnutls_session_t session, unsigned int ms)
ret = session->internals.pull_timeout_func(fd, ms);
err = get_errno (session);
- if (ret == -1 && err == EINTR)
- return GNUTLS_E_INTERRUPTED;
- else if (ret == -1 && err == EAGAIN)
- return GNUTLS_E_AGAIN;
- else if (ret == -1)
- return gnutls_assert_val(GNUTLS_E_PULL_ERROR);
-
+ if (ret == -1)
+ return errno_to_gerr(err);
+
if (ret > 0)
return 0;
else return GNUTLS_E_TIMEDOUT;