Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0175BF6EB for ; Mon, 22 Apr 2013 14:09:39 +0000 (UTC) Received: (qmail 51874 invoked by uid 500); 22 Apr 2013 14:09:38 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 51733 invoked by uid 500); 22 Apr 2013 14:09:38 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 51721 invoked by uid 99); 22 Apr 2013 14:09:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Apr 2013 14:09:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Apr 2013 14:09:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 48B8F2388A6C; Mon, 22 Apr 2013 14:09:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1470526 - in /httpd/httpd/branches/2.4.x: ./ STATUS modules/aaa/mod_access_compat.c modules/filters/mod_ext_filter.c modules/generators/mod_cgi.c modules/metadata/mod_remoteip.c modules/session/mod_session_crypto.c server/config.c Date: Mon, 22 Apr 2013 14:09:13 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130422140914.48B8F2388A6C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Mon Apr 22 14:09:12 2013 New Revision: 1470526 URL: http://svn.apache.org/r1470526 Log: Merge r1463056 from trunk: Use %pm available since apr 1.3 instead of an extra call to apr_strerror Submitted by: sf 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/aaa/mod_access_compat.c httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c httpd/httpd/branches/2.4.x/modules/generators/mod_cgi.c httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c httpd/httpd/branches/2.4.x/server/config.c Propchange: httpd/httpd/branches/2.4.x/ ------------------------------------------------------------------------------ Merged /httpd/httpd/trunk:r1463056 Modified: httpd/httpd/branches/2.4.x/STATUS URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1470526&r1=1470525&r2=1470526&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/STATUS (original) +++ httpd/httpd/branches/2.4.x/STATUS Mon Apr 22 14:09:12 2013 @@ -90,11 +90,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * various: Use %pm available since apr 1.3 instead of an extra call to apr_strerror - trunk patches: https://svn.apache.org/r1463056 - 2.4.x patch: trunk patch works (with offset) - +1: jailletc36, minfrin, sf - * mod_auth_digest: 3 easy votes to keep in line with trunk simplification with ap_bin2hex() + use apr_array for an array Modified: httpd/httpd/branches/2.4.x/modules/aaa/mod_access_compat.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/aaa/mod_access_compat.c?rev=1470526&r1=1470525&r2=1470526&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/modules/aaa/mod_access_compat.c (original) +++ httpd/httpd/branches/2.4.x/modules/aaa/mod_access_compat.c Mon Apr 22 14:09:12 2013 @@ -147,7 +147,6 @@ static const char *allow_cmd(cmd_parms * allowdeny *a; char *where = apr_pstrdup(cmd->pool, where_c); char *s; - char msgbuf[120]; apr_status_t rv; if (strcasecmp(from, "from")) @@ -178,17 +177,14 @@ static const char *allow_cmd(cmd_parms * return "An IP address was expected"; } else if (rv != APR_SUCCESS) { - apr_strerror(rv, msgbuf, sizeof msgbuf); - return apr_pstrdup(cmd->pool, msgbuf); + return apr_psprintf(cmd->pool, "%pm", &rv); } a->type = T_IP; } else if (!APR_STATUS_IS_EINVAL(rv = apr_ipsubnet_create(&a->x.ip, where, NULL, cmd->pool))) { - if (rv != APR_SUCCESS) { - apr_strerror(rv, msgbuf, sizeof msgbuf); - return apr_pstrdup(cmd->pool, msgbuf); - } + if (rv != APR_SUCCESS) + return apr_psprintf(cmd->pool, "%pm", &rv); a->type = T_IP; } else { /* no slash, didn't look like an IP address => must be a host */ Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c?rev=1470526&r1=1470525&r2=1470526&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c (original) +++ httpd/httpd/branches/2.4.x/modules/filters/mod_ext_filter.c Mon Apr 22 14:09:12 2013 @@ -396,7 +396,6 @@ static void child_errfn(apr_pool_t *pool request_rec *r; void *vr; apr_file_t *stderr_log; - char errbuf[200]; char time_str[APR_CTIME_LEN]; apr_pool_userdata_get(&vr, ERRFN_USERDATA_KEY, pool); @@ -404,11 +403,11 @@ static void child_errfn(apr_pool_t *pool apr_file_open_stderr(&stderr_log, pool); ap_recent_ctime(time_str, apr_time_now()); apr_file_printf(stderr_log, - "[%s] [client %s] mod_ext_filter (%d)%s: %s\n", + "[%s] [client %s] mod_ext_filter (%d)%pm: %s\n", time_str, r->useragent_ip, err, - apr_strerror(err, errbuf, sizeof(errbuf)), + &err, description); } Modified: httpd/httpd/branches/2.4.x/modules/generators/mod_cgi.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/generators/mod_cgi.c?rev=1470526&r1=1470525&r2=1470526&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/modules/generators/mod_cgi.c (original) +++ httpd/httpd/branches/2.4.x/modules/generators/mod_cgi.c Mon Apr 22 14:09:12 2013 @@ -354,16 +354,15 @@ static void cgi_child_errfn(apr_pool_t * const char *description) { apr_file_t *stderr_log; - char errbuf[200]; apr_file_open_stderr(&stderr_log, pool); /* Escape the logged string because it may be something that * came in over the network. */ apr_file_printf(stderr_log, - "(%d)%s: %s\n", + "(%d)%pm: %s\n", err, - apr_strerror(err, errbuf, sizeof(errbuf)), + &err, #ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED ap_escape_logitem(pool, #endif Modified: httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c?rev=1470526&r1=1470525&r2=1470526&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c (original) +++ httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c Mon Apr 22 14:09:12 2013 @@ -170,10 +170,9 @@ static const char *proxies_set(cmd_parms } if (rv != APR_SUCCESS) { - char msgbuf[128]; - apr_strerror(rv, msgbuf, sizeof(msgbuf)); - return apr_pstrcat(cmd->pool, "RemoteIP: Error parsing IP ", arg, - " (", msgbuf, " error) for ", cmd->cmd->name, NULL); + return apr_psprintf(cmd->pool, + "RemoteIP: Error parsing IP %s (%pm error) for %s", + arg, &rv, cmd->cmd->name); } return NULL; @@ -192,9 +191,8 @@ static const char *proxylist_read(cmd_pa filename = ap_server_root_relative(cmd->temp_pool, filename); rv = ap_pcfg_openfile(&cfp, cmd->temp_pool, filename); if (rv != APR_SUCCESS) { - return apr_psprintf(cmd->pool, "%s: Could not open file %s: %s", - cmd->cmd->name, filename, - apr_strerror(rv, lbuf, sizeof(lbuf))); + return apr_psprintf(cmd->pool, "%s: Could not open file %s: %pm", + cmd->cmd->name, filename, &rv); } while (!(ap_cfg_getline(lbuf, MAX_STRING_LEN, cfp))) { Modified: httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c?rev=1470526&r1=1470525&r2=1470526&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c (original) +++ httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c Mon Apr 22 14:09:12 2013 @@ -556,9 +556,8 @@ static const char *set_crypto_passphrase filename = ap_server_root_relative(cmd->temp_pool, filename); rv = ap_pcfg_openfile(&file, cmd->temp_pool, filename); if (rv != APR_SUCCESS) { - return apr_psprintf(cmd->pool, "%s: Could not open file %s: %s", - cmd->cmd->name, filename, - apr_strerror(rv, buffer, sizeof(buffer))); + return apr_psprintf(cmd->pool, "%s: Could not open file %s: %pm", + cmd->cmd->name, filename, &rv); } while (!(ap_cfg_getline(buffer, sizeof(buffer), file))) { Modified: httpd/httpd/branches/2.4.x/server/config.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/config.c?rev=1470526&r1=1470525&r2=1470526&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/server/config.c (original) +++ httpd/httpd/branches/2.4.x/server/config.c Mon Apr 22 14:09:12 2013 @@ -1798,9 +1798,8 @@ AP_DECLARE(const char *) ap_process_reso rv = ap_pcfg_openfile(&cfp, p, fname); if (rv != APR_SUCCESS) { - char errmsg[120]; - return apr_psprintf(p, "Could not open configuration file %s: %s", - fname, apr_strerror(rv, errmsg, sizeof errmsg)); + return apr_psprintf(p, "Could not open configuration file %s: %pm", + fname, &rv); } parms.config_file = cfp; @@ -1852,9 +1851,8 @@ static const char *process_resource_conf */ rv = apr_dir_open(&dirp, path, ptemp); if (rv != APR_SUCCESS) { - char errmsg[120]; - return apr_psprintf(p, "Could not open config directory %s: %s", - path, apr_strerror(rv, errmsg, sizeof errmsg)); + return apr_psprintf(p, "Could not open config directory %s: %pm", + path, &rv); } candidates = apr_array_make(ptemp, 1, sizeof(fnames)); @@ -1939,9 +1937,8 @@ static const char *process_resource_conf */ rv = apr_dir_open(&dirp, path, ptemp); if (rv != APR_SUCCESS) { - char errmsg[120]; - return apr_psprintf(p, "Could not open config directory %s: %s", - path, apr_strerror(rv, errmsg, sizeof errmsg)); + return apr_psprintf(p, "Could not open config directory %s: %pm", + path, &rv); } candidates = apr_array_make(ptemp, 1, sizeof(fnames));