diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2017-06-01 21:10:38 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2017-06-01 21:10:38 +0000 |
commit | 756f50883aba4e9300f1ad7f6d4bd45126bcbe5e (patch) | |
tree | f56ffa9edcbe2acb2713e49a1bbfdc2f83159c22 /locks/netware/proc_mutex.c | |
parent | 2cd5ccdf8478207f435692b6630265bd209beb58 (diff) | |
download | libapr-756f50883aba4e9300f1ad7f6d4bd45126bcbe5e.tar.gz |
Partially revert 1738806 (r1733775, r1738791 from trunk), preserve
apr_os_proc_mutex_get_ex|_put_ex, but fall back to the supported
APR_LOCK_DEFAULT
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1797267 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks/netware/proc_mutex.c')
-rw-r--r-- | locks/netware/proc_mutex.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/locks/netware/proc_mutex.c b/locks/netware/proc_mutex.c index 3322dfeeb..c36488828 100644 --- a/locks/netware/proc_mutex.c +++ b/locks/netware/proc_mutex.c @@ -27,9 +27,13 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex, { apr_status_t ret; apr_proc_mutex_t *new_mutex = NULL; + + if (mech != APR_LOCK_DEFAULT) { + return APR_ENOTIMPL; + } + new_mutex = (apr_proc_mutex_t *)apr_pcalloc(pool, sizeof(apr_proc_mutex_t)); - - if(new_mutex ==NULL) { + if (new_mutex == NULL) { return APR_ENOMEM; } @@ -123,10 +127,12 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex if (mech) { *mech = APR_LOCK_DEFAULT; } - return APR_SUCCESS; #else - return APR_ENOTIMPL; + if (mech) { + *mech = APR_LOCK_DEFAULT; + } #endif + return APR_SUCCESS; } APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex, |