httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r428700 - /httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/sharedmem_util.c
Date Fri, 04 Aug 2006 11:44:01 GMT
Author: jfclere
Date: Fri Aug  4 04:44:01 2006
New Revision: 428700

URL: http://svn.apache.org/viewvc?rev=428700&view=rev
Log:
Remove shared memory before creating it. (That only removes the file!).

Modified:
    httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/sharedmem_util.c

Modified: httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/sharedmem_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/sharedmem_util.c?rev=428700&r1=428699&r2=428700&view=diff
==============================================================================
--- httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/sharedmem_util.c (original)
+++ httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/sharedmem_util.c Fri Aug  4 04:44:01
2006
@@ -210,12 +210,15 @@
         }
         ptr = ptr +  sizeof(desc);
     } else  {
-        if (name && name[0] != ':')
+        if (name && name[0] != ':') {
+            apr_shm_remove(fname, globalpool);
             rv = apr_shm_create(&res->shm, item_size * item_num + sizeof(struct sharedslotdesc),
fname, globalpool);
-        else
+        } else {
             rv = apr_shm_create(&res->shm, item_size * item_num + sizeof(struct sharedslotdesc),
NULL, globalpool);
-        if (rv != APR_SUCCESS)
+        }
+        if (rv != APR_SUCCESS) {
             return rv;
+        }
         ptr = apr_shm_baseaddr_get(res->shm);
         desc.item_size = item_size;
         desc.item_num = item_num;



Mime
View raw message