summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2006-04-05 10:41:46 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2006-04-05 10:41:46 +0000
commitd4dbcde11c1d82bfa306654c5aeaa3ea3a70fbd7 (patch)
tree1ee7548874a54a7625dc377fffcac3827bd8df1b /network_io
parent9d8aa7cac25ee137d37fcda73317e98ea81a70af (diff)
downloadlibapr-d4dbcde11c1d82bfa306654c5aeaa3ea3a70fbd7.tar.gz
* network_io/unix/sendrecv.c (apr_socket_sendv): Implement for
!HAVE_WRITEV build. PR: 38822 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@391579 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/unix/sendrecv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
index 3aba50215..7017ec324 100644
--- a/network_io/unix/sendrecv.c
+++ b/network_io/unix/sendrecv.c
@@ -180,10 +180,10 @@ apr_status_t apr_socket_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock,
return APR_SUCCESS;
}
-#ifdef HAVE_WRITEV
apr_status_t apr_socket_sendv(apr_socket_t * sock, const struct iovec *vec,
apr_int32_t nvec, apr_size_t *len)
{
+#ifdef HAVE_WRITEV
apr_ssize_t rv;
apr_size_t requested_len = 0;
apr_int32_t i;
@@ -225,8 +225,11 @@ do_select:
}
(*len) = rv;
return APR_SUCCESS;
-}
+#else
+ *len = vec[0].iov_len;
+ return apr_socket_send(sock, vec[0].iov_base, len);
#endif
+}
#if APR_HAS_SENDFILE