You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2014/01/24 23:10:12 UTC
svn commit: r1561211 - /httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
Author: jim
Date: Fri Jan 24 22:10:12 2014
New Revision: 1561211
URL: http://svn.apache.org/r1561211
Log:
Revert to assuming APR uses ftok(..,1)
Modified:
httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
Modified: httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c?rev=1561211&r1=1561210&r2=1561211&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c (original)
+++ httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c Fri Jan 24 22:10:12 2014
@@ -98,20 +98,12 @@ static apr_status_t unixd_set_shm_perms(
int shmid;
apr_ssize_t slen = strlen(fname);
- shmkey = ftok(fname,
- (int)apr_hashfunc_default(fname, &slen));
+ shmkey = ftok(fname, 1);
if (shmkey == (key_t)-1) {
return errno;
}
if ((shmid = shmget(shmkey, 0, SHM_R | SHM_W)) == -1) {
- /* see if we are using a key of 1 */
- shmkey = ftok(fname, 1);
- if (shmkey == (key_t)-1) {
- return errno;
- }
- if ((shmid = shmget(shmkey, 0, SHM_R | SHM_W)) == -1)
- return errno;
- }
+ return errno;
}
#if MODULE_MAGIC_NUMBER_MAJOR <= 20081212
#define ap_unixd_config unixd_config