View | Details | Raw Unified | Return to bug 48958
Collapse All | Expand All

(-)modules/ldap/util_ldap_cache.c (+2 lines)
Lines 420-425 Link Here
420
    apr_status_t result;
420
    apr_status_t result;
421
    apr_size_t size;
421
    apr_size_t size;
422
422
423
    if (st->cache_bytes > 0) {
423
    if (st->cache_file) {
424
    if (st->cache_file) {
424
        /* Remove any existing shm segment with this name. */
425
        /* Remove any existing shm segment with this name. */
425
        apr_shm_remove(st->cache_file, st->pool);
426
        apr_shm_remove(st->cache_file, st->pool);
Lines 442-447 Link Here
442
    if (result != APR_SUCCESS) {
443
    if (result != APR_SUCCESS) {
443
        return result;
444
        return result;
444
    }
445
    }
446
    }
445
447
446
#endif
448
#endif
447
449
(-)modules/ldap/util_ldap_cache_mgr.c (-1 / +1 lines)
Lines 335-341 Link Here
335
335
336
#if APR_HAS_SHARED_MEMORY
336
#if APR_HAS_SHARED_MEMORY
337
    if (!st->cache_rmm) {
337
    if (!st->cache_rmm) {
338
        return NULL;
338
        cache = (util_ald_cache_t *)calloc(sizeof(util_ald_cache_t), 1);
339
    }
339
    }
340
    else {
340
    else {
341
        apr_rmm_off_t block = apr_rmm_calloc(st->cache_rmm, sizeof(util_ald_cache_t));
341
        apr_rmm_off_t block = apr_rmm_calloc(st->cache_rmm, sizeof(util_ald_cache_t));
(-)modules/ldap/util_ldap.c (-2 / +2 lines)
Lines 2710-2716 Link Here
2710
#if APR_HAS_SHARED_MEMORY
2710
#if APR_HAS_SHARED_MEMORY
2711
        /* If the cache file already exists then delete it.  Otherwise we are
2711
        /* If the cache file already exists then delete it.  Otherwise we are
2712
         * going to run into problems creating the shared memory. */
2712
         * going to run into problems creating the shared memory. */
2713
        if (st->cache_file) {
2713
        if (st->cache_file && st->cache_bytes > 0) {
2714
            char *lck_file = apr_pstrcat(ptemp, st->cache_file, ".lck",
2714
            char *lck_file = apr_pstrcat(ptemp, st->cache_file, ".lck",
2715
                                         NULL);
2715
                                         NULL);
2716
            apr_file_remove(lck_file, ptemp);
2716
            apr_file_remove(lck_file, ptemp);
Lines 2723-2729 Link Here
2723
    /* initializing cache if shared memory size is not zero and we already
2723
    /* initializing cache if shared memory size is not zero and we already
2724
     * don't have shm address
2724
     * don't have shm address
2725
     */
2725
     */
2726
    if (!st->cache_shm && st->cache_bytes > 0) {
2726
    if (!st->cache_shm && st->cache_bytes >= 0) {
2727
#endif
2727
#endif
2728
        result = util_ldap_cache_init(p, st);
2728
        result = util_ldap_cache_init(p, st);
2729
        if (result != APR_SUCCESS) {
2729
        if (result != APR_SUCCESS) {

Return to bug 48958