httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r462580 - in /httpd/httpd/trunk: CHANGES server/core_filters.c
Date Tue, 10 Oct 2006 21:31:36 GMT
Author: minfrin
Date: Tue Oct 10 14:31:36 2006
New Revision: 462580

URL: http://svn.apache.org/viewvc?view=rev&rev=462580
Log:
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.


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/server/core_filters.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?view=diff&rev=462580&r1=462579&r2=462580
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Oct 10 14:31:36 2006
@@ -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>]
 

Modified: httpd/httpd/trunk/server/core_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core_filters.c?view=diff&rev=462580&r1=462579&r2=462580
==============================================================================
--- httpd/httpd/trunk/server/core_filters.c (original)
+++ httpd/httpd/trunk/server/core_filters.c Tue Oct 10 14:31:36 2006
@@ -330,7 +330,7 @@
 
 #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 @@
                         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 @@
 #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);



Mime
View raw message