diff options
author | peter <peter@FreeBSD.org> | 2014-08-12 01:40:11 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2014-08-12 01:40:11 +0000 |
commit | 72d63a715ab3bb85109696154deb9b90d0495852 (patch) | |
tree | ce225c894795f3e26aadf9170baf8fd0556c18d2 /contrib/apr/locks/unix/proc_mutex.c | |
parent | d307c6d3b7fc94a241aab28f56b9e92a10d98bee (diff) | |
download | FreeBSD-src-72d63a715ab3bb85109696154deb9b90d0495852.zip FreeBSD-src-72d63a715ab3bb85109696154deb9b90d0495852.tar.gz |
MFC r266728,266731,266735,266736,268135,268960,269833
Update apr 1.4.8 -> 1.5.1
Update apr-util 1.5.2 -> 1.5.3
Update serf 1.3.4 -> 1.3.7
Update svnlite 1.8.8 -> 1.8.10
Deal with svnlite.1 manpage.
Diffstat (limited to 'contrib/apr/locks/unix/proc_mutex.c')
-rw-r--r-- | contrib/apr/locks/unix/proc_mutex.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/apr/locks/unix/proc_mutex.c b/contrib/apr/locks/unix/proc_mutex.c index f9637e0..fa8a872 100644 --- a/contrib/apr/locks/unix/proc_mutex.c +++ b/contrib/apr/locks/unix/proc_mutex.c @@ -102,8 +102,8 @@ static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex, apr_ssize_t flen = strlen(fname); char *p = apr_pstrndup(new_mutex->pool, fname, strlen(fname)); unsigned int h1, h2; - h1 = apr_hashfunc_default((const char *)p, &flen); - h2 = rshash(p); + h1 = (apr_hashfunc_default((const char *)p, &flen) & 0xffffffff); + h2 = (rshash(p) & 0xffffffff); apr_snprintf(semname, sizeof(semname), "/ApR.%xH%x", h1, h2); } else { apr_time_t now; @@ -951,7 +951,12 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex, apr_proc_mutex_t *pmutex) { #if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE || APR_HAS_POSIXSEM_SERIALIZE - ospmutex->crossproc = pmutex->interproc->filedes; + if (pmutex->interproc) { + ospmutex->crossproc = pmutex->interproc->filedes; + } + else { + ospmutex->crossproc = -1; + } #endif #if APR_HAS_PROC_PTHREAD_SERIALIZE ospmutex->pthread_interproc = pmutex->pthread_interproc; |