diff options
author | Ingo Huerner <ingo.huerner@xse.de> | 2014-09-26 11:05:00 +0200 |
---|---|---|
committer | Ingo Huerner <ingo.huerner@xse.de> | 2014-09-26 11:05:00 +0200 |
commit | e9d26c31181e02215ef6eb1ad2630bd47426db22 (patch) | |
tree | 422fdfb1a8a2d659528a5a521d73ccb7e811a5be | |
parent | 8b0ef106f21c589c216ad30279fb2b958a54c7a0 (diff) | |
download | persistence-client-library-e9d26c31181e02215ef6eb1ad2630bd47426db22.tar.gz |
Added munmap when mapping customLibConfigFile; removed runtime setting of key-value data size, this must be set during compile time to the same size as the storage backed (pers common object)
-rw-r--r-- | src/persistence_client_library.c | 7 | ||||
-rw-r--r-- | src/persistence_client_library_custom_loader.c | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/persistence_client_library.c b/src/persistence_client_library.c index 2b57062..cea6784 100644 --- a/src/persistence_client_library.c +++ b/src/persistence_client_library.c @@ -79,8 +79,6 @@ int pclInitLibrary(const char* appName, int shutdownMode) DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclInitLibrary => I N I T Persistence Client Library - "), DLT_STRING(appName), DLT_STRING("- init counter: "), DLT_INT(gPclInitialized) ); - /// environment variable for max key value data - const char *pDataSize = getenv("PERS_MAX_KEY_VAL_DATA_SIZE"); char blacklistPath[DbPathMaxLen] = {0}; #if USE_FILECACHE @@ -90,11 +88,6 @@ int pclInitLibrary(const char* appName, int shutdownMode) pthread_mutex_lock(&gDbusPendingRegMtx); // block until pending received - if(pDataSize != NULL) - { - gMaxKeyValDataSize = atoi(pDataSize); - } - // Assemble backup blacklist path sprintf(blacklistPath, "%s%s/%s", CACHEPREFIX, appName, gBackupFilename); diff --git a/src/persistence_client_library_custom_loader.c b/src/persistence_client_library_custom_loader.c index dbfc6fa..134b893 100644 --- a/src/persistence_client_library_custom_loader.c +++ b/src/persistence_client_library_custom_loader.c @@ -278,6 +278,11 @@ int get_custom_libraries() } i+=4; // move to the next configuration file entry } + + if(munmap(customConfFileMap, buffer.st_size) == -1) + { + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("get_custom_libraries - failed to unmap - "), DLT_STRING(strerror(errno))); + } close(fd); } else |