summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-01-09 04:35:10 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-01-09 04:35:10 +0000
commit44fe21be46770c4734284c7ea4b8102bbf457a21 (patch)
tree30a0a14cce7705f18140f8d69d7cea27ceb581a3
parentd36d393fc7a0b898d8aa6e62ba2f843ed89123ff (diff)
downloadlibapr-44fe21be46770c4734284c7ea4b8102bbf457a21.tar.gz
Correct the shm length returned based on the original reqsize
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62730 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--shmem/win32/shm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/shmem/win32/shm.c b/shmem/win32/shm.c
index 29408194f..3b9f66cb4 100644
--- a/shmem/win32/shm.c
+++ b/shmem/win32/shm.c
@@ -179,12 +179,13 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
(*m)->pool = pool;
(*m)->hMap = hMap;
(*m)->memblk = base;
- (*m)->usrmem = (char*)base + sizeof(memblock_t);
(*m)->size = size;
- (*m)->length = reqsize;
+
+ (*m)->usrmem = (char*)base + sizeof(memblock_t);
+ (*m)->length = reqsize - sizeof(memblock_t);;
- (*m)->memblk->length = reqsize;
- (*m)->memblk->size = size;
+ (*m)->memblk->length = (*m)->length;
+ (*m)->memblk->size = (*m)->size;
apr_pool_cleanup_register((*m)->pool, *m,
shm_cleanup, apr_pool_cleanup_null);