You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by pq...@apache.org on 2004/12/05 07:57:08 UTC

svn commit: r109865 - /apr/apr/trunk/file_io/unix/readwrite.c

Author: pquerna
Date: Sat Dec  4 22:57:08 2004
New Revision: 109865

URL: http://svn.apache.org/viewcvs?view=rev&rev=109865
Log:
* file_io/unix/readwrite.c: use apr_file_write_full() to write all of the data to a file.
On an exceptional error (See apr_file_write_full), we will add the bytes that did get written, and then exit.

Modified:
   apr/apr/trunk/file_io/unix/readwrite.c

Modified: apr/apr/trunk/file_io/unix/readwrite.c
Url: http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/unix/readwrite.c?view=diff&rev=109865&p1=apr/apr/trunk/file_io/unix/readwrite.c&r1=109864&p2=apr/apr/trunk/file_io/unix/readwrite.c&r2=109865
==============================================================================
--- apr/apr/trunk/file_io/unix/readwrite.c	(original)
+++ apr/apr/trunk/file_io/unix/readwrite.c	Sat Dec  4 22:57:08 2004
@@ -241,14 +241,14 @@
         return APR_SUCCESS;
     }
 #else
-    int i, tbytes;
+    int i;
+    int tbytes;
     apr_status_t rv = APR_SUCCESS;
 
     *nbytes = 0;
 
-    for(i = 0; i < nvec; i++){
-         tbytes = vec[i].iov_len;
-         rv = apr_file_write(thefile, vec[i].iov_base, &tbytes);
+    for(i = 0; i < nvec; i++) {
+         rv = apr_file_write_full(thefile, vec[i].iov_base, vec[i].iov_len, &tbytes);
          *nbytes += tbytes;
          if(rv != APR_SUCCESS)
              break;