Bug 59978 - [patch] Add log message when ap_mutex_register fails
Summary: [patch] Add log message when ap_mutex_register fails
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: All (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-11 15:13 UTC by jiazhouyang
Modified: 2016-08-11 15:58 UTC (History)
0 users



Attachments
Add log message when ap_mutex_register fails (2.44 KB, patch)
2016-08-11 15:13 UTC, jiazhouyang
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jiazhouyang 2016-08-11 15:13:28 UTC
Created attachment 34124 [details]
Add log message when ap_mutex_register fails

Function ap_mutex_register may fail. The majority of calls have checked the return value and printed log message like the following code snippet, while the others have not. Those unchecked ones probably need logs too (see attachment).


/* httpd-2.4.10/modules/proxy/mod_proxy.c:2687:23 */
    apr_status_t rv = ap_mutex_register(pconf, proxy_id, NULL,
            APR_LOCK_DEFAULT, 0);
    if (rv != APR_SUCCESS) {
        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02480)
                "failed to register %s mutex", proxy_id);
        return 500; /* An HTTP status would be a misnomer! */
    }