mmapstorage: small fixes
@@ -183,7 +183,8 @@ static void mmapToKeySet (char * mappedRegion, KeySet * returned)
KeySet * keySet = (KeySet *) (mappedRegion + SIZEOF_MMAPINFO);
returned->array = keySet->array;
returned->size = keySet->size;
- ksRewind(returned);
+ returned->alloc = keySet->alloc;
+ ksRewind(returned); // cursor = 0; current = 0
returned->flags = keySet->flags;
}
@@ -266,12 +267,6 @@ int elektraMmapstorageGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Ke
ELEKTRA_LOG_WARNING ("mappedRegion size: %zu", sbuf.st_size);
ELEKTRA_LOG_WARNING ("mappedRegion ptr: %p", (void *) mappedRegion);
-
-
-
-
-
-
mmapToKeySet (mappedRegion, returned);
//munmap(mappedRegion, sbuf.st_size);
