diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-10-21 11:53:24 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-10-21 11:53:24 +0000 |
commit | 031923b0658fd4544dce2865c5d7e4f61b457664 (patch) | |
tree | a73c640edac5d5282def532b556be8d3b8525cdb | |
parent | c523488f0f38b9eeb6106a429d0902b1837a5ea1 (diff) | |
download | gnutls-031923b0658fd4544dce2865c5d7e4f61b457664.tar.gz |
made gnutls_write() unaware of interrupted system calls and eagain errors.
-rw-r--r-- | lib/gnutls_buffers.c | 7 |
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; } |