You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jf...@apache.org on 2006/08/04 13:44:01 UTC

svn commit: r428700 - /httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/sharedmem_util.c

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;



Re: svn commit: r428700 - /httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/sharedmem_util.c

Posted by Paul Querna <ch...@force-elite.com>.
jfclere@apache.org wrote:
> 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);

This line should be:
}
else {

Thanks,

-Paul

Re: svn commit: r428700 - /httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/sharedmem_util.c

Posted by Paul Querna <ch...@force-elite.com>.
jfclere@apache.org wrote:
> 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);

This line should be:
}
else {

Thanks,

-Paul