]> granicus.if.org Git - apache/commitdiff
sendfile_nonblocking() takes the _brigade_ as an argument, gets
authorGraham Leggett <minfrin@apache.org>
Tue, 10 Oct 2006 21:31:36 +0000 (21:31 +0000)
committerGraham Leggett <minfrin@apache.org>
Tue, 10 Oct 2006 21:31:36 +0000 (21:31 +0000)
the first bucket from the brigade, finds it not to be a FILE
bucket and barfs. The fix is to pass a bucket rather than a brigade.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@462580 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/core_filters.c

diff --git a/CHANGES b/CHANGES
index 41f9a83457750d3f76e46d4948412751532f84e4..ff208c7e168f4abc5287415ede736d8c991da9e2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,11 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) sendfile_nonblocking() takes the _brigade_ as an argument, gets 
+     the first bucket from the brigade, finds it not to be a FILE
+     bucket and barfs. The fix is to pass a bucket rather than a brigade.
+     [Niklas Edmundsson <nikke acc.umu.se>]
+
   *) mod_disk_cache: Do away with the write-to-file-then-move-in-place
      mentality. [Niklas Edmundsson <nikke acc.umu.se>]
 
index 7c48d8a56da388893691e343d866b78ab89e8e02..da58f3ec844790ca432f0e06aa5c9747a3b3a860 100644 (file)
@@ -330,7 +330,7 @@ static apr_status_t writev_nonblocking(apr_socket_t *s,
 
 #if APR_HAS_SENDFILE
 static apr_status_t sendfile_nonblocking(apr_socket_t *s,
-                                         apr_bucket_brigade *bb,
+                                         apr_bucket *bucket,
                                          apr_size_t *cumulative_bytes_written,
                                          conn_rec *c);
 #endif
@@ -567,7 +567,7 @@ static apr_status_t send_brigade_nonblocking(apr_socket_t *s,
                         return rv;
                     }
                 }
-                rv = sendfile_nonblocking(s, bb, bytes_written, c);
+                rv = sendfile_nonblocking(s, bucket, bytes_written, c);
                 if (nvec > 0) {
                     (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0);
                 }
@@ -730,21 +730,21 @@ static apr_status_t writev_nonblocking(apr_socket_t *s,
 #if APR_HAS_SENDFILE
 
 static apr_status_t sendfile_nonblocking(apr_socket_t *s,
-                                         apr_bucket_brigade *bb,
+                                         apr_bucket *bucket,
                                          apr_size_t *cumulative_bytes_written,
                                          conn_rec *c)
 {
     apr_status_t rv = APR_SUCCESS;
-    apr_bucket *bucket;
     apr_bucket_file *file_bucket;
     apr_file_t *fd;
     apr_size_t file_length;
     apr_off_t file_offset;
     apr_size_t bytes_written = 0;
 
-    bucket = APR_BRIGADE_FIRST(bb);
     if (!APR_BUCKET_IS_FILE(bucket)) {
-        /* XXX log a "this should never happen" message */
+        ap_log_error(APLOG_MARK, APLOG_ERR, rv, c->base_server,
+                     "core_filter: sendfile_nonblocking: "
+                     "this should never happen");
         return APR_EGENERAL;
     }
     file_bucket = (apr_bucket_file *)(bucket->data);