You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@locus.apache.org on 2000/02/19 01:58:46 UTC
cvs commit: apache-2.0/src/lib/apr/file_io/unix readwrite.c
manoj 00/02/18 16:58:46
Modified: src/lib/apr/file_io/unix readwrite.c
Log:
Bring the Unix writev code up-to-date, by updating the writev
interface and returning 0 bytes written on error.
Revision Changes Path
1.20 +6 -5 apache-2.0/src/lib/apr/file_io/unix/readwrite.c
Index: readwrite.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/readwrite.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- readwrite.c 2000/01/06 14:43:10 1.19
+++ readwrite.c 2000/02/19 00:58:46 1.20
@@ -213,7 +213,7 @@
*/
#ifdef HAVE_WRITEV
-ap_status_t ap_make_iov(struct iovec_t **new, struct iovec *iova, ap_context_t *cntxt)
+ap_status_t ap_make_iov(struct iovec_t **new, const struct iovec *iova, ap_context_t *cntxt)
{
(*new) = ap_palloc(cntxt, sizeof(struct iovec_t));
if ((*new) == NULL) {
@@ -224,15 +224,16 @@
return APR_SUCCESS;
}
-ap_status_t ap_writev(struct file_t *thefile, const struct iovec_t *vec, ap_ssize_t *iocnt)
+ap_status_t ap_writev(struct file_t *thefile, const ap_iovec_t *vec,
+ ap_size_t nvec, ap_ssize_t *nbytes)
{
int bytes;
- if ((bytes = writev(thefile->filedes, vec->theiov, *iocnt)) < 0) {
- *iocnt = bytes;
+ if ((bytes = writev(thefile->filedes, vec->theiov, nvec)) < 0) {
+ *nbytes = 0;
return errno;
}
else {
- *iocnt = bytes;
+ *nbytes = bytes;
return APR_SUCCESS;
}
}