From: Jim Jagielski Date: Fri, 15 Nov 2013 17:07:52 +0000 (+0000) Subject: Merge r1533065, r1491724, r1425360, r1496194 from trunk: X-Git-Tag: 2.4.7~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb785df95f4490a7a6820672604f6526bd8802e0;p=apache Merge r1533065, r1491724, r1425360, r1496194 from trunk: Eclipse code analysis warning Reduce stack usage by 3k style fixes, add comment no code change attribute and error reason reversed Submitted by: jim, jailletc36, sf, covener Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1542329 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index f47a452b93..d6a7db7227 100644 --- a/STATUS +++ b/STATUS @@ -97,19 +97,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * easy proposals to synch 2.4.x and trunk - - mod_proxy.c: Eclipse code analysis warning - - mod_mime_magic.c: Reduce stack usage by 3k - - mod_log_config.c: style fixes, add comment, no code change - - mod_authnz_ldap.c: attribute and error reason reversed - trunk patches: - - http://svn.apache.org/r1533065 - - http://svn.apache.org/r1491724 - - http://svn.apache.org/r1425360 - - http://svn.apache.org/r1496194 - 2.4.x patch: trunk patches work - +1: jailletc36, jim, jorton - * mod_proxy_fcgi: Sync with trunk trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1523281 https://svn.apache.org/viewvc?view=revision&revision=1524368 diff --git a/modules/aaa/mod_authnz_ldap.c b/modules/aaa/mod_authnz_ldap.c index 2c25dbc73f..d46eeb44ed 100644 --- a/modules/aaa/mod_authnz_ldap.c +++ b/modules/aaa/mod_authnz_ldap.c @@ -894,7 +894,7 @@ static authz_status ldapgroup_check_authorization(request_rec *r, ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01719) "auth_ldap authorize: require group \"%s\": " "didn't match with attr %s [%s][%d - %s]", - t, ldc->reason, ent[i].name, result, + t, ent[i].name, ldc->reason, result, ldap_err2string(result)); } } diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index e1a8204171..f17e164156 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -194,8 +194,8 @@ static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s, static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s, const char* name); -static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle); -static ap_log_writer* ap_log_set_writer(ap_log_writer *handle); +static ap_log_writer_init *ap_log_set_writer_init(ap_log_writer_init *handle); +static ap_log_writer *ap_log_set_writer(ap_log_writer *handle); static ap_log_writer *log_writer = ap_default_log_writer; static ap_log_writer_init *log_writer_init = ap_default_log_writer_init; static int buffered_logs = 0; /* default unbuffered */ @@ -1507,7 +1507,7 @@ static void ap_register_log_handler(apr_pool_t *p, char *tag, apr_hash_set(log_hash, tag, 1, (const void *)log_struct); } -static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle) +static ap_log_writer_init *ap_log_set_writer_init(ap_log_writer_init *handle) { ap_log_writer_init *old = log_writer_init; log_writer_init = handle; @@ -1536,6 +1536,10 @@ static apr_status_t ap_default_log_writer( request_rec *r, int i; apr_status_t rv; + /* + * We do this memcpy dance because write() is atomic for len < PIPE_BUF, + * while writev() need not be. + */ str = apr_palloc(r->pool, len + 1); for (i = 0, s = str; i < nelts; ++i) { @@ -1616,6 +1620,10 @@ static apr_status_t ap_buffered_log_writer(request_rec *r, if (len >= LOG_BUFSIZE) { apr_size_t w; + /* + * We do this memcpy dance because write() is atomic for + * len < PIPE_BUF, while writev() need not be. + */ str = apr_palloc(r->pool, len + 1); for (i = 0, s = str; i < nelts; ++i) { memcpy(s, strs[i], strl[i]); diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c index 03226aca5e..693ceca808 100644 --- a/modules/metadata/mod_mime_magic.c +++ b/modules/metadata/mod_mime_magic.c @@ -1973,7 +1973,7 @@ static int ascmagic(request_rec *r, unsigned char *buf, apr_size_t nbytes) { int has_escapes = 0; unsigned char *s; - char nbuf[HOWMANY + 1]; /* one extra for terminating '\0' */ + char nbuf[SMALL_HOWMANY + 1]; /* one extra for terminating '\0' */ char *token; const struct names *p; int small_nbytes; diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index b2092a7867..88ddb89989 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -2439,7 +2439,7 @@ static int proxy_status_hook(request_rec *r, int flags) proxy_balancer *balancer = NULL; proxy_worker **worker = NULL; - if (flags & AP_STATUS_SHORT || conf->balancers->nelts == 0 || + if ((flags & AP_STATUS_SHORT) || conf->balancers->nelts == 0 || conf->proxy_status == status_off) return OK;