httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1621600 - in /httpd/httpd/branches/2.4.x: ./ STATUS modules/filters/mod_xml2enc.c modules/http/byterange_filter.c modules/proxy/mod_proxy_ftp.c server/core_filters.c server/util_script.c
Date Sun, 31 Aug 2014 16:06:37 GMT
Author: jim
Date: Sun Aug 31 16:06:36 2014
New Revision: 1621600

URL: http://svn.apache.org/r1621600
Log:
Merge r1615026 from trunk:

Turn some APR_BUCKET_REMOVE(e)+apr_bucket_destroy(e) into the equivalent apr_bucket_delete(e)
to reduce code verbosity

Submitted by: jailletc36
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/filters/mod_xml2enc.c
    httpd/httpd/branches/2.4.x/modules/http/byterange_filter.c
    httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c
    httpd/httpd/branches/2.4.x/server/core_filters.c
    httpd/httpd/branches/2.4.x/server/util_script.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1615026

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1621600&r1=1621599&r2=1621600&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Sun Aug 31 16:06:36 2014
@@ -101,12 +101,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * Turn some APR_BUCKET_REMOVE(e)+apr_bucket_destroy(e) into the equivalent
-     apr_bucket_delete(e) to reduce code verbosity
-     trunk patch: http://svn.apache.org/r1615026
-     2.4.x patch: trunk patch works
-     +1: jailletc36, ylavic, covener
-
    * mod_proxy_http: Proxy responses with error status and "ProxyErrorOverride On"
      hang until proxy timeout.  PR53420
      Regression from 2.2. It was introduced by r912063 in order to fix PR41646.

Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_xml2enc.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_xml2enc.c?rev=1621600&r1=1621599&r2=1621600&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_xml2enc.c (original)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_xml2enc.c Sun Aug 31 16:06:36 2014
@@ -142,8 +142,7 @@ static void fix_skipto(request_rec* r, x
                                                &bstart);
                     ap_assert(rv == APR_SUCCESS);
                     while (b = APR_BRIGADE_FIRST(ctx->bbsave), b != bstart) {
-                        APR_BUCKET_REMOVE(b);
-                        apr_bucket_destroy(b);
+                        apr_bucket_delete(b);
                     }
                     ctx->bytes -= (p-ctx->buf);
                     ctx->buf = p ;
@@ -228,8 +227,7 @@ static void sniff_encoding(request_rec* 
         /* cut out the <meta> we're invalidating */
         while (cutb != cute) {
             b = APR_BUCKET_NEXT(cutb);
-            APR_BUCKET_REMOVE(cutb);
-            apr_bucket_destroy(cutb);
+            apr_bucket_delete(cutb);
             cutb = b;
         }
         /* and leave a string */
@@ -435,8 +433,7 @@ static apr_status_t xml2enc_ffunc(ap_fil
                 /* remove the data we've just read */
                 rv = apr_brigade_partition(bb, bytes, &bstart);
                 while (b = APR_BRIGADE_FIRST(bb), b != bstart) {
-                    APR_BUCKET_REMOVE(b);
-                    apr_bucket_destroy(b);
+                    apr_bucket_delete(b);
                 }
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, APLOGNO(01438)
                               "xml2enc: consuming %" APR_SIZE_T_FMT

Modified: httpd/httpd/branches/2.4.x/modules/http/byterange_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http/byterange_filter.c?rev=1621600&r1=1621599&r2=1621600&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http/byterange_filter.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http/byterange_filter.c Sun Aug 31 16:06:36 2014
@@ -380,8 +380,7 @@ static apr_status_t copy_brigade_range(a
                     return rv;
                 }
                 out_first = APR_BUCKET_NEXT(copy);
-                APR_BUCKET_REMOVE(copy);
-                apr_bucket_destroy(copy);
+                apr_bucket_delete(copy);
             }
             else {
                 out_first = copy;
@@ -400,8 +399,7 @@ static apr_status_t copy_brigade_range(a
                 }
                 copy = APR_BUCKET_NEXT(copy);
                 if (copy != APR_BRIGADE_SENTINEL(bbout)) {
-                    APR_BUCKET_REMOVE(copy);
-                    apr_bucket_destroy(copy);
+                    apr_bucket_delete(copy);
                 }
             }
             break;

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c?rev=1621600&r1=1621599&r2=1621600&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ftp.c Sun Aug 31 16:06:36 2014
@@ -275,8 +275,7 @@ static apr_status_t ftp_string_read(conn
                     pos += len;
                 }
             }
-            APR_BUCKET_REMOVE(e);
-            apr_bucket_destroy(e);
+            apr_bucket_delete(e);
         }
         *pos = '\0';
     }
@@ -634,8 +633,7 @@ static apr_status_t proxy_send_dir_filte
             /* len+1 to leave space for the trailing nil char */
             apr_cpystrn(ctx->buffer+strlen(ctx->buffer), response, len+1);
 
-            APR_BUCKET_REMOVE(e);
-            apr_bucket_destroy(e);
+            apr_bucket_delete(e);
         }
 
         /* EOS? jump to footer */

Modified: httpd/httpd/branches/2.4.x/server/core_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/core_filters.c?rev=1621600&r1=1621599&r2=1621600&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/core_filters.c (original)
+++ httpd/httpd/branches/2.4.x/server/core_filters.c Sun Aug 31 16:06:36 2014
@@ -718,8 +718,7 @@ static void remove_empty_buckets(apr_buc
     apr_bucket *bucket;
     while (((bucket = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) &&
            (APR_BUCKET_IS_METADATA(bucket) || (bucket->length == 0))) {
-        APR_BUCKET_REMOVE(bucket);
-        apr_bucket_destroy(bucket);
+        apr_bucket_delete(bucket);
     }
 }
 
@@ -792,19 +791,16 @@ static apr_status_t writev_nonblocking(a
             for (i = offset; i < nvec; ) {
                 apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
                 if (APR_BUCKET_IS_METADATA(bucket)) {
-                    APR_BUCKET_REMOVE(bucket);
-                    apr_bucket_destroy(bucket);
+                    apr_bucket_delete(bucket);
                 }
                 else if (n >= vec[i].iov_len) {
-                    APR_BUCKET_REMOVE(bucket);
-                    apr_bucket_destroy(bucket);
+                    apr_bucket_delete(bucket);
                     offset++;
                     n -= vec[i++].iov_len;
                 }
                 else {
                     apr_bucket_split(bucket, n);
-                    APR_BUCKET_REMOVE(bucket);
-                    apr_bucket_destroy(bucket);
+                    apr_bucket_delete(bucket);
                     vec[i].iov_len -= n;
                     vec[i].iov_base = (char *) vec[i].iov_base + n;
                     break;
@@ -883,12 +879,10 @@ static apr_status_t sendfile_nonblocking
     *cumulative_bytes_written += bytes_written;
     if ((bytes_written < file_length) && (bytes_written > 0)) {
         apr_bucket_split(bucket, bytes_written);
-        APR_BUCKET_REMOVE(bucket);
-        apr_bucket_destroy(bucket);
+        apr_bucket_delete(bucket);
     }
     else if (bytes_written == file_length) {
-        APR_BUCKET_REMOVE(bucket);
-        apr_bucket_destroy(bucket);
+        apr_bucket_delete(bucket);
     }
     return rv;
 }

Modified: httpd/httpd/branches/2.4.x/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util_script.c?rev=1621600&r1=1621599&r2=1621600&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util_script.c (original)
+++ httpd/httpd/branches/2.4.x/server/util_script.c Sun Aug 31 16:06:36 2014
@@ -704,8 +704,7 @@ static int getsfunc_BRIGADE(char *buf, i
             apr_bucket_split(e, src - bucket_data);
         }
         next = APR_BUCKET_NEXT(e);
-        APR_BUCKET_REMOVE(e);
-        apr_bucket_destroy(e);
+        apr_bucket_delete(e);
         e = next;
     }
     *dst = 0;



Mime
View raw message