summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2001-10-21 11:53:24 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2001-10-21 11:53:24 +0000
commit031923b0658fd4544dce2865c5d7e4f61b457664 (patch)
treea73c640edac5d5282def532b556be8d3b8525cdb
parentc523488f0f38b9eeb6106a429d0902b1837a5ea1 (diff)
downloadgnutls-031923b0658fd4544dce2865c5d7e4f61b457664.tar.gz
made gnutls_write() unaware of interrupted system calls and eagain errors.
-rw-r--r--lib/gnutls_buffers.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index 274225960f..b4d72f73f1 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -381,6 +381,9 @@ ssize_t _gnutls_write(int fd, const void *iptr, size_t n, int flags)
while (left > 0) {
i = _gnutls_send_func(fd, &ptr[i], left, flags);
if (i == -1) {
+#if 0 /* currently this is not right, since the functions
+ * above this, cannot handle interrupt, and eagain errors.
+ */
if (errno == EAGAIN || errno == EINTR) {
if (n-left > 0) {
gnutls_assert();
@@ -393,6 +396,10 @@ ssize_t _gnutls_write(int fd, const void *iptr, size_t n, int flags)
gnutls_assert();
return GNUTLS_E_UNKNOWN_ERROR;
}
+#endif
+ gnutls_assert();
+ return GNUTLS_E_UNKNOWN_ERROR;
+
}
left -= i;
}