Commit 21190e3e authored by Joe Orton's avatar Joe Orton
Browse files

Merge r1486027, r1828909, r1839249, r1842888, r1844343, r1846651 from trunk:

Clarify the existing behavior.

* modules/generators/mod_info.c: Constify fixed tables and mark
  module-private global variables static. No functional change.

Axe an old and apparently out-dated comment.

There is a typo in the comment.
HN_UPDATE_SEC has been renamed HM_UPDATE_SEC.
The TODO seems to have been taken into account in r759862.

* modules/filters/mod_deflate.c
  (deflate_out_filter): Fix typo setting output note. (Coverity warning)
  (deflate_in_filter): Fix redundant assignment. (clang warning)

* modules/md/md_acme_authz.c (md_acme_authz_update): Fix typo in log
  message.

* modules/dav/main/mod_dav.c (dav_method_propfind): Tag the scratchpool.

Submitted by: minfrin, jorton, jailletc36
Reviewed by: jailletc36, icing, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1855300 13f79535-47bb-0310-9956-ffa450edef68
parent 293cff48
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -624,9 +624,7 @@ static apr_status_t hm_watchdog_callback(int state, void *data,
            /* store in the slotmem or in the file depending on configuration */
            hm_update_stats(ctx, pool);
            cur = now = apr_time_sec(apr_time_now());
            /* TODO: Insted HN_UPDATE_SEC use
             * the ctx->interval
             */

            while ((now - cur) < apr_time_sec(ctx->interval)) {
                int n;
                apr_status_t rc;
+1 −0
Original line number Diff line number Diff line
@@ -2113,6 +2113,7 @@ static int dav_method_propfind(request_rec *r)
    ctx.r = r;
    ctx.bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
    apr_pool_create(&ctx.scratchpool, r->pool);
    apr_pool_tag(ctx.scratchpool, "mod_dav-scratch");

    /* ### should open read-only */
    if ((err = dav_open_lockdb(r, 0, &ctx.w.lockdb)) != NULL) {
+4 −0
Original line number Diff line number Diff line
@@ -1047,6 +1047,10 @@ DAV_DECLARE_NONSTD(void) dav_prop_exec(dav_prop_ctx *ctx)
            /*
            ** Delete the property. Ignore errors -- the property is there, or
            ** we are deleting it for a second time.
            **
            ** http://tools.ietf.org/html/rfc4918#section-14.23 says
            ** "Specifying the removal of a property that does not exist is
            ** not an error"
            */
            /* ### but what about other errors? */
            (void) (*propdb->db_hooks->remove)(propdb->db, &name);
+1 −3
Original line number Diff line number Diff line
@@ -866,7 +866,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,

            if (c->note_output_name) {
                apr_table_setn(r->notes, c->note_output_name,
                               (ctx->stream.total_in > 0)
                               (ctx->stream.total_out > 0)
                                ? apr_off_t_toa(r->pool,
                                                ctx->stream.total_out)
                                : "-");
@@ -1338,8 +1338,6 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
            ctx->stream.next_in = (unsigned char *)data;
            ctx->stream.avail_in = (int)len;

            zRC = Z_OK;

            if (!ctx->validation_buffer) {
                while (ctx->stream.avail_in != 0) {
                    if (ctx->stream.avail_out == 0) {
+6 −6
Original line number Diff line number Diff line
@@ -80,9 +80,9 @@ typedef struct
module AP_MODULE_DECLARE_DATA info_module;

/* current file name when doing -DDUMP_CONFIG */
const char *dump_config_fn_info;
static const char *dump_config_fn_info;
/* file handle when doing -DDUMP_CONFIG */
apr_file_t *out = NULL;
static apr_file_t *out = NULL;

static void *create_info_config(apr_pool_t * p, server_rec * s)
{
@@ -297,7 +297,7 @@ typedef struct
    hook_get_t get;
} hook_lookup_t;

static hook_lookup_t startup_hooks[] = {
static const hook_lookup_t startup_hooks[] = {
    {"Pre-Config", ap_hook_get_pre_config},
    {"Check Configuration", ap_hook_get_check_config},
    {"Test Configuration", ap_hook_get_test_config},
@@ -311,7 +311,7 @@ static hook_lookup_t startup_hooks[] = {
    {NULL},
};

static hook_lookup_t request_hooks[] = {
static const hook_lookup_t request_hooks[] = {
    {"Pre-Connection", ap_hook_get_pre_connection},
    {"Create Connection", ap_hook_get_create_connection},
    {"Process Connection", ap_hook_get_process_connection},
@@ -339,7 +339,7 @@ static hook_lookup_t request_hooks[] = {
    {NULL},
};

static hook_lookup_t other_hooks[] = {
static const hook_lookup_t other_hooks[] = {
    {"Monitor", ap_hook_get_monitor},
    {"Child Status", ap_hook_get_child_status},
    {"End Generation", ap_hook_get_end_generation},
@@ -378,7 +378,7 @@ static int module_find_hook(module * modp, hook_get_t hook_get)

static void module_participate(request_rec * r,
                               module * modp,
                               hook_lookup_t * lookup, int *comma)
                               const hook_lookup_t *lookup, int *comma)
{
    if (module_find_hook(modp, lookup->get)) {
        if (*comma) {
Loading