]> granicus.if.org Git - apache/commitdiff
Revert to assuming APR uses ftok(..,1)
authorJim Jagielski <jim@apache.org>
Fri, 24 Jan 2014 22:10:12 +0000 (22:10 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 24 Jan 2014 22:10:12 +0000 (22:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561211 13f79535-47bb-0310-9956-ffa450edef68

modules/slotmem/mod_slotmem_shm.c

index 9707a6224ffacc1f9e616f705eb99f1d290b570d..b892cb775c206070afc5ffe24e3538f9c501e8c3 100644 (file)
@@ -98,20 +98,12 @@ static apr_status_t unixd_set_shm_perms(const char *fname)
     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