diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-01-09 04:35:10 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-01-09 04:35:10 +0000 |
commit | 44fe21be46770c4734284c7ea4b8102bbf457a21 (patch) | |
tree | 30a0a14cce7705f18140f8d69d7cea27ceb581a3 | |
parent | d36d393fc7a0b898d8aa6e62ba2f843ed89123ff (diff) | |
download | libapr-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.c | 9 |
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); |