From 236796526d94f802508d31f6ea234bf0fb8c1719 Mon Sep 17 00:00:00 2001 From: Ingo Huerner Date: Fri, 4 Apr 2014 16:58:18 +0200 Subject: [PATCH] Removed itzam, and switched to commom library; Known issues: delete key test fails, DLT warnings --- configure.ac | 24 +- .../persistence_client_library_rc_table.h | 144 ---- persistence_client_library.pc.in | 6 +- src/Makefile.am | 14 +- src/crc32.c | 10 +- {include_protected => src}/crc32.h | 2 +- src/persistence_client_library.c | 54 +- src/persistence_client_library_backup_filelist.c | 39 +- src/persistence_client_library_backup_filelist.h | 3 +- src/persistence_client_library_custom_loader.c | 54 +- src/persistence_client_library_data_organization.c | 20 +- .../persistence_client_library_data_organization.h | 44 +- src/persistence_client_library_db_access.c | 861 ++++++--------------- .../persistence_client_library_db_access.h | 129 ++- src/persistence_client_library_dbus_cmd.c | 52 +- src/persistence_client_library_dbus_service.c | 85 +- src/persistence_client_library_file.c | 86 +- src/persistence_client_library_handle.c | 10 +- src/persistence_client_library_handle.h | 19 +- src/persistence_client_library_itzam_errors.c | 145 ---- src/persistence_client_library_itzam_errors.h | 90 --- src/persistence_client_library_key.c | 45 +- src/persistence_client_library_lc_interface.c | 30 +- src/persistence_client_library_pas_interface.c | 39 +- src/persistence_client_library_prct_access.c | 110 +-- src/persistence_client_library_prct_access.h | 26 +- test/Makefile.am | 2 +- test/data/Data.tar.gz | Bin 56183 -> 56286 bytes test/persistence_client_library_test.c | 52 +- 29 files changed, 788 insertions(+), 1407 deletions(-) delete mode 100644 include_protected/persistence_client_library_rc_table.h rename {include_protected => src}/crc32.h (92%) rename {include_protected => src}/persistence_client_library_data_organization.h (87%) rename {include_protected => src}/persistence_client_library_db_access.h (59%) delete mode 100644 src/persistence_client_library_itzam_errors.c delete mode 100644 src/persistence_client_library_itzam_errors.h diff --git a/configure.ac b/configure.ac index 8cdfb7b..3e68985 100644 --- a/configure.ac +++ b/configure.ac @@ -69,7 +69,7 @@ AC_CHECK_FUNCS([fdatasync ftruncate mkdir munmap rmdir strerror utime dlopen]) PKG_CHECK_MODULES(DEPS, automotive-dlt dbus-1 - libitzam) + libperscommon) AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) @@ -115,6 +115,28 @@ else fi ###################################################################### +# enable persistence file cahce component ########### +AC_ARG_ENABLE([filecache], + [AS_HELP_STRING([--enable-filecache],[Enable file cache component])], + [use_filecache=$enableval], + [use_filecache="no"]) + +AM_CONDITIONAL([USE_FILECACHE], [test x"$use_filecache" = "no"]) + +if test "$use_filecache" != "yes" -a "$use_filecache" != "no"; then + AC_MSG_ERROR([Invalid file cache check mode specified: $use_filecache. Only "yes" or "no" is valid]) +else + AC_MSG_NOTICE([Use file cache: $use_filecache]) + + if test "$use_filecache" = "yes"; then + PKG_CHECK_MODULES(PFC, persistence_file_cache) + AC_DEFINE_UNQUOTED([USE_FILECACHE], [1], [filecache enabled]) + fi +fi + AC_SUBST(PFC_CFLAGS) + AC_SUBST(PFC_LIBS) +###################################################################### + AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], diff --git a/include_protected/persistence_client_library_rc_table.h b/include_protected/persistence_client_library_rc_table.h deleted file mode 100644 index 6cb0668..0000000 --- a/include_protected/persistence_client_library_rc_table.h +++ /dev/null @@ -1,144 +0,0 @@ -#ifndef PERSISTENCE_CLIENT_LIBRARY_RC_TABLE_H -#define PERSISTENCE_CLIENT_LIBRARY_RC_TABLE_H - -/****************************************************************************** - * Project Persistency - * (c) copyright 2012 - * Company XS Embedded GmbH - *****************************************************************************/ -/****************************************************************************** - * This Source Code Form is subject to the terms of the - * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed - * with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -******************************************************************************/ - /** - * @file persistence_client_library_rc_table.h - * @ingroup Persistence client library - * @author Ingo Huerner - * @brief Header of the persistence client library resource config table. - * @see - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include // needed for file open flags - -#define PERSIST_DATA_RC_TABLE_INTERFACE_VERSION (0x03000000U) - -#include "persistence_client_library_data_organization.h" - - -/// enumerator used to identify the policy to manage the data -typedef enum _PersistencePolicy_e -{ - PersistencePolicy_wc = 0, /**< the data is managed write cached */ - PersistencePolicy_wt = 1, /**< the data is managed write through */ - PersistencePolicy_na = 2, /**< the data is not applicable */ - - /** insert new entries here ... */ - PersistencePolicy_LastEntry /**< last entry */ - -} PersistencePolicy_e; - - -/// enumerator used to identify the persistence storage to manage the data -typedef enum _PersistenceStorage_e -{ - PersistenceStorage_local = 0, /**< the data is managed local */ - PersistenceStorage_shared = 1, /**< the data is managed shared */ - PersistenceStorage_custom = 2, /**< the data is managed over custom client implementation */ - - /** insert new entries here ... */ - PersistenceStorage_LastEntry /**< last entry */ - -} PersistenceStorage_e; - - - -/** specify the type of the resource */ -typedef enum PersistenceResourceType_e_ -{ - PersistenceResourceType_key = 0, /**< key type resource */ - PersistenceResourceType_file, /**< file type resource */ - - /** insert new entries here ... */ - PersistenceResourceType_LastEntry /**< last entry */ - -} PersistenceResourceType_e; - - - -/// structure used to manage database context -typedef struct _PersistenceDbContext_s -{ - unsigned int ldbid; - unsigned int user_no; - unsigned int seat_no; -} PersistenceDbContext_s; - - -typedef enum PersistencePermission_e_ -{ - PersistencePermission_ReadWrite = 0, - PersistencePermission_ReadOnly = 1, - PersistencePermission_WriteOnly = 2, - - /** insert new entries here ... */ - PersistencePermission_LastEntry /**< last entry */ -} PersistencePermission_e; - - - -/// structure used to manage the persistence configuration for a key -typedef struct _PersistenceConfigurationKey_s -{ - PersistencePolicy_e policy; /**< policy */ - PersistenceStorage_e storage; /**< definition of storage to use */ - PersistenceResourceType_e type; /**< type of the resource - since 4.0.0.0*/ - PersistencePermission_e permission; /**< file access flags*/ - unsigned int max_size; /**< max size expected for the key */ - char reponsible[MaxConfKeyLengthResp]; /**< name of responsible application */ - char custom_name[MaxConfKeyLengthCusName]; /**< name of the customer plugin */ - char customID[MaxRctLengthCustom_ID]; /**< internal ID for the custom type resource */ -} PersistenceConfigurationKey_s; - - -/// structure definition of an persistence resource configuration table entry -typedef struct _PersistenceRctEntry_s -{ - char key[PrctKeySize]; /**< the key */ - PersistenceConfigurationKey_s data; /**< data for the key */ -} -PersistenceRctEntry_s; - - -/// persistence information -typedef struct _PersistenceInfo_s -{ - PersistenceDbContext_s context; /**< database context*/ - PersistenceConfigurationKey_s configKey; /**< prct configuration key*/ - -} PersistenceInfo_s; - - - -/// persistence resource config table type definition -typedef enum _PersistenceRCT_e -{ - PersistenceRCT_local = 0, - PersistenceRCT_shared_public = 1, - PersistenceRCT_shared_group = 2, - - PersistenceRCT_LastEntry // last Entry - -} PersistenceRCT_e; - - - -#ifdef __cplusplus -} -#endif - -#endif /* PERSISTENCY_CLIENT_LIBRARY_RC_TABLE_H */ diff --git a/persistence_client_library.pc.in b/persistence_client_library.pc.in index 2b40b17..b5e4e14 100644 --- a/persistence_client_library.pc.in +++ b/persistence_client_library.pc.in @@ -8,8 +8,8 @@ datadir=@datadir@ Name: persistence client library Description: persistence client library Version: @VERSION@ -Requires: automotive-dlt -Requires.private: libitzam dbus-1 +Requires: automotive-dlt libperscommon +Requires.private: dbus-1 Libs: -L${libdir} -lpersistence_client_library -lrt -ldl -Libs.private: -lpersistence_client_library_common_data -ldbus +Libs.private: -ldbus Cflags: -I${includedir} diff --git a/src/Makefile.am b/src/Makefile.am index 8f51515..7a2248a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,18 +15,10 @@ include_HEADERS = ../include/persistence_client_library_key.h \ ../include/persistence_client_library.h \ ../include/persistence_client_library_error_def.h \ ../include/persistence_client_custom.h - -lib_LTLIBRARIES = libpersistence_client_library_common_data.la libpersistence_client_library.la +lib_LTLIBRARIES = libpersistence_client_library.la - - -libpersistence_client_library_common_data_la_SOURCES = \ - persistence_client_library_data_organization.c - - - -libpersistence_client_library_la_LIBADD = $(DEPS_LIBS) -ldl -lpersistence_client_library_common_data +libpersistence_client_library_la_LIBADD = $(DEPS_LIBS) $(PFC_LIBS) -ldl -lpers_common libpersistence_client_library_la_SOURCES = \ persistence_client_library.c \ @@ -39,7 +31,7 @@ libpersistence_client_library_la_SOURCES = \ persistence_client_library_dbus_service.c \ persistence_client_library_custom_loader.c \ persistence_client_library_prct_access.c \ - persistence_client_library_itzam_errors.c \ + persistence_client_library_data_organization.c \ persistence_client_library_backup_filelist.c \ persistence_client_library_dbus_cmd.c \ crc32.c \ diff --git a/src/crc32.c b/src/crc32.c index ad325ad..709a974 100644 --- a/src/crc32.c +++ b/src/crc32.c @@ -51,7 +51,7 @@ */ -#include "../include_protected/crc32.h" +#include "crc32.h" enum crc32ConstantDefinition @@ -107,7 +107,7 @@ static unsigned int crc32_tab[] = 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -const unsigned int pclCrc32(unsigned int crc, const unsigned char *buf, size_t theSize) +unsigned int pclCrc32(unsigned int crc, const unsigned char *buf, size_t theSize) { const unsigned char *p = 0; unsigned int rval = 0; @@ -119,10 +119,10 @@ const unsigned int pclCrc32(unsigned int crc, const unsigned char *buf, size_t t { while(theSize--) { - unsigned int index = (crc ^ *p++) & 0xFF; + unsigned int idx = (crc ^ *p++) & 0xFF; - if(index < crc32_array_size) - crc = crc32_tab[index] ^ (crc >> 8); + if(idx < crc32_array_size) + crc = crc32_tab[idx] ^ (crc >> 8); } rval = crc ^ ~0U; } diff --git a/include_protected/crc32.h b/src/crc32.h similarity index 92% rename from include_protected/crc32.h rename to src/crc32.h index 8a4e0b9..1d43392 100644 --- a/include_protected/crc32.h +++ b/src/crc32.h @@ -30,7 +30,7 @@ extern "C" { #include -const unsigned int pclCrc32(unsigned int crc, const unsigned char *buf, size_t theSize); +unsigned int pclCrc32(unsigned int crc, const unsigned char *buf, size_t theSize); #ifdef __cplusplus diff --git a/src/persistence_client_library.c b/src/persistence_client_library.c index 4eba3bf..9c22464 100644 --- a/src/persistence_client_library.c +++ b/src/persistence_client_library.c @@ -25,20 +25,20 @@ #include "persistence_client_library_custom_loader.h" #include "persistence_client_library.h" #include "persistence_client_library_backup_filelist.h" -#include "../include_protected/persistence_client_library_db_access.h" +#include "persistence_client_library_db_access.h" + +#if USE_FILECACHE + #include +#endif #include #include #include #include - -#include -#include - #include /// debug log and trace (DLT) setup -DLT_DECLARE_CONTEXT(gDLTContext); +DLT_DECLARE_CONTEXT(gPclDLTContext); static int gShutdownMode = 0; @@ -52,8 +52,8 @@ int pclInitLibrary(const char* appName, int shutdownMode) { gShutdownMode = shutdownMode; - DLT_REGISTER_CONTEXT(gDLTContext,"PCL","Context for persistence client library logging"); - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclInitLibrary => I N I T Persistence Client Library - "), DLT_STRING(gAppId), + DLT_REGISTER_CONTEXT(gPclDLTContext,"PCL","Context for persistence client library logging"); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclInitLibrary => I N I T Persistence Client Library - "), DLT_STRING(gAppId), DLT_STRING("- init counter: "), DLT_INT(gPclInitialized) ); /// environment variable for on demand loading of custom libraries @@ -63,12 +63,20 @@ int pclInitLibrary(const char* appName, int shutdownMode) /// blacklist path environment variable const char *pBlacklistPath = getenv("PERS_BLACKLIST_PATH"); +#if USE_FILECACHE + printf("* * * * * * Using the filecache! * * * * * * * * *\n"); + + pfcInitCache(appName); +#else + printf("* * * * * * N O T using the filecache! * * * * * *\n"); +#endif + #if USE_PASINTERFACE == 1 //printf("* ADMIN INTERFACE is - e n a b l e d - \n"); - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("PAS interface is enabled!!")); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("PAS interface is enabled!!")); #else //printf("* ADMIN INTERFACE is - d i s a b l e d - enable with \"./configure --enable-pasinterface\"\n"); - DLT_LOG(gDLTContext, DLT_LOG_WARN, DLT_STRING("PAS interface is not enabled, enable with \"./configure --enable-pasinterface\"")); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("PAS interface is not enabled, enable with \"./configure --enable-pasinterface\"")); #endif @@ -86,12 +94,12 @@ int pclInitLibrary(const char* appName, int shutdownMode) if(readBlacklistConfigFile(pBlacklistPath) == -1) { - DLT_LOG(gDLTContext, DLT_LOG_WARN, DLT_STRING("pclInitLibrary -> failed to access blacklist:"), DLT_STRING(pBlacklistPath)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("pclInitLibrary -> failed to access blacklist:"), DLT_STRING(pBlacklistPath)); } if(setup_dbus_mainloop() == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => Failed to setup main loop")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => Failed to setup main loop")); pthread_mutex_unlock(&gDbusPendingRegMtx); return EPERS_DBUS_MAINLOOP; } @@ -102,7 +110,7 @@ int pclInitLibrary(const char* appName, int shutdownMode) // register for lifecycle and persistence admin service dbus messages if(register_lifecycle(shutdownMode) == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => Failed to register to lifecycle dbus interface")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => Failed to register to lifecycle dbus interface")); pthread_mutex_unlock(&gDbusPendingRegMtx); return EPERS_REGISTER_LIFECYCLE; } @@ -110,7 +118,7 @@ int pclInitLibrary(const char* appName, int shutdownMode) #if USE_PASINTERFACE == 1 if(register_pers_admin_service() == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => Failed to register to pers admin dbus interface")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => Failed to register to pers admin dbus interface")); pthread_mutex_unlock(&gDbusPendingRegMtx); return EPERS_REGISTER_ADMIN; } @@ -136,19 +144,19 @@ int pclInitLibrary(const char* appName, int shutdownMode) { if( (gPersCustomFuncs[i].custom_plugin_init) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclInitLibrary => Loaded plugin: "), + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclInitLibrary => Loaded plugin: "), DLT_STRING(get_custom_client_lib_name(i))); gPersCustomFuncs[i].custom_plugin_init(); } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => E r r o r could not load plugin functions: "), + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => E r r o r could not load plugin functions: "), DLT_STRING(get_custom_client_lib_name(i))); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => E r r o r could not load plugin: "), + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclInitLibrary => E r r o r could not load plugin: "), DLT_STRING(get_custom_client_lib_name(i))); } } @@ -161,7 +169,7 @@ int pclInitLibrary(const char* appName, int shutdownMode) } else { - DLT_LOG(gDLTContext, DLT_LOG_WARN, DLT_STRING("pclInit => Failed to load custom library config table => error number:"), DLT_INT(status)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("pclInit => Failed to load custom library config table => error number:"), DLT_INT(status)); } // assign application name @@ -173,7 +181,7 @@ int pclInitLibrary(const char* appName, int shutdownMode) else if(gPclInitialized >= PCLinitialized) { gPclInitialized++; // increment init counter - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclInitLibrary => I N I T Persistence Client Library - "), DLT_STRING(gAppId), + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclInitLibrary => I N I T Persistence Client Library - "), DLT_STRING(gAppId), DLT_STRING("- ONLY INCREMENT init counter: "), DLT_INT(gPclInitialized) ); } return rval; @@ -188,7 +196,7 @@ int pclDeinitLibrary(void) if(gPclInitialized == PCLinitialized) { int* retval; - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclDeinitLibrary -> D E I N I T client library - "), DLT_STRING(gAppId), + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclDeinitLibrary -> D E I N I T client library - "), DLT_STRING(gAppId), DLT_STRING("- init counter: "), DLT_INT(gPclInitialized)); // unregister for lifecycle and persistence admin service dbus messages @@ -217,7 +225,7 @@ int pclDeinitLibrary(void) pers_rct_close_all(); // close opend database - pers_db_close_all(); + database_close_all(); // close persistence handles close_all_persistence_handle(); @@ -236,11 +244,11 @@ int pclDeinitLibrary(void) gPclInitialized = PCLnotInitialized; - DLT_UNREGISTER_CONTEXT(gDLTContext); + DLT_UNREGISTER_CONTEXT(gPclDLTContext); } else if(gPclInitialized > PCLinitialized) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclDeinitLibrary -> D E I N I T client library - "), DLT_STRING(gAppId), + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclDeinitLibrary -> D E I N I T client library - "), DLT_STRING(gAppId), DLT_STRING("- ONLY DECREMENT init counter: "), DLT_INT(gPclInitialized)); gPclInitialized--; // decrement init counter } diff --git a/src/persistence_client_library_backup_filelist.c b/src/persistence_client_library_backup_filelist.c index f87942d..060901c 100644 --- a/src/persistence_client_library_backup_filelist.c +++ b/src/persistence_client_library_backup_filelist.c @@ -19,18 +19,15 @@ #include "persistence_client_library_backup_filelist.h" #include "persistence_client_library_handle.h" #include "rbtree.h" -#include "../include_protected/crc32.h" -#include "../include_protected/persistence_client_library_data_organization.h" + +#include "crc32.h" +#include "persistence_client_library_data_organization.h" -#include -#include #include #include #include -#include #include -#include #include @@ -176,14 +173,14 @@ int readBlacklistConfigFile(const char* filename) fd = open(filename, O_RDONLY); if (fd == -1) { - DLT_LOG(gDLTContext, DLT_LOG_WARN, DLT_STRING("configReader::readConfigFile ==> Error file open"), DLT_STRING(filename), DLT_STRING(strerror(errno)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("configReader::readConfigFile ==> Error file open"), DLT_STRING(filename), DLT_STRING(strerror(errno)) ); return -1; } // check for empty file if(gConfigFileSize == 0) { - DLT_LOG(gDLTContext, DLT_LOG_WARN, DLT_STRING("configReader::readConfigFile ==> Error file size is 0:"), DLT_STRING(filename)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("configReader::readConfigFile ==> Error file size is 0:"), DLT_STRING(filename)); close(fd); return -1; } @@ -195,7 +192,7 @@ int readBlacklistConfigFile(const char* filename) { gpConfigFileMap = 0; close(fd); - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("configReader::readConfigFile ==> Error mapping the file:"), DLT_STRING(filename), DLT_STRING(strerror(errno)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("configReader::readConfigFile ==> Error mapping the file:"), DLT_STRING(filename), DLT_STRING(strerror(errno)) ); return -1; } @@ -245,7 +242,7 @@ int need_backup_key(unsigned int key) free(item); rval = -1; - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("need_backup_key ==> item or gRb_tree_bl is NULL")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("need_backup_key ==> item or gRb_tree_bl is NULL")); } return rval; @@ -376,7 +373,7 @@ int pclCreateFile(const char* path) } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclCreateFile ==> no valid path to create: "), DLT_STRING(path) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclCreateFile ==> no valid path to create: "), DLT_STRING(path) ); } return handle; @@ -402,7 +399,7 @@ int pclVerifyConsistency(const char* origPath, const char* backupPath, const cha // ************************************************* if( (backupAvail == 0) && (csumAvail == 0) ) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclVerifyConsistency => there is a backup file AND a checksum")); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclVerifyConsistency => there is a backup file AND a checksum")); // calculate checksum form backup file fdBackup = open(backupPath, O_RDONLY); if(fdBackup != -1) @@ -461,7 +458,7 @@ int pclVerifyConsistency(const char* origPath, const char* backupPath, const cha // ************************************************* else if(csumAvail == 0) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclVerifyConsistency => there is ONLY a checksum file")); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclVerifyConsistency => there is ONLY a checksum file")); fdCsum = open(csumPath, O_RDONLY); if(fdCsum != -1) @@ -469,7 +466,7 @@ int pclVerifyConsistency(const char* origPath, const char* backupPath, const cha readSize = read(fdCsum, csumBuf, ChecksumBufSize); if(readSize <= 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclVerifyConsistency => read checksum: invalid readSize")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclVerifyConsistency => read checksum: invalid readSize")); } close(fdCsum); @@ -503,7 +500,7 @@ int pclVerifyConsistency(const char* origPath, const char* backupPath, const cha // ************************************************* else if(backupAvail == 0) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclVerifyConsistency => there is ONLY a backup file")); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclVerifyConsistency => there is ONLY a backup file")); // calculate checksum form backup file fdBackup = open(backupPath, O_RDONLY); @@ -564,7 +561,7 @@ int pclRecoverFromBackup(int backupFd, const char* original) // copy data from one file to another if((handle = pclBackupDoFileCopy(backupFd, handle)) == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclRecoverFromBackup => couldn't write whole buffer")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclRecoverFromBackup => couldn't write whole buffer")); } } @@ -595,13 +592,13 @@ int pclCreateBackup(const char* dstPath, int srcfd, const char* csumPath, const int csumSize = strlen(csumBuf); if(write(csfd, csumBuf, csumSize) != csumSize) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclCreateBackup => failed to write checksum to file")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclCreateBackup => failed to write checksum to file")); } close(csfd); } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclCreateBackup => failed to create checksum file:"), DLT_STRING(strerror(errno)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclCreateBackup => failed to create checksum file:"), DLT_STRING(strerror(errno)) ); } // create backup file, user and group has read/write permission, others have read permission @@ -615,12 +612,12 @@ int pclCreateBackup(const char* dstPath, int srcfd, const char* csumPath, const // copy data from one file to another if((readSize = pclBackupDoFileCopy(srcfd, dstFd)) == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pcl_create_backup => error copying file")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pcl_create_backup => error copying file")); } if(close(dstFd) == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pcl_create_backup => error closing fd")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pcl_create_backup => error closing fd")); } // set back to the position @@ -628,7 +625,7 @@ int pclCreateBackup(const char* dstPath, int srcfd, const char* csumPath, const } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclCreateBackup => failed to open backup file"), + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclCreateBackup => failed to open backup file"), DLT_STRING(dstPath), DLT_STRING(strerror(errno))); } diff --git a/src/persistence_client_library_backup_filelist.h b/src/persistence_client_library_backup_filelist.h index 0771ae4..1350bbf 100644 --- a/src/persistence_client_library_backup_filelist.h +++ b/src/persistence_client_library_backup_filelist.h @@ -20,7 +20,8 @@ */ -#include "../include_protected/persistence_client_library_rc_table.h" +//#include "../include_protected/persistence_client_library_rc_table.h" +#include /** * @brief Read the blacklist configuration file diff --git a/src/persistence_client_library_custom_loader.c b/src/persistence_client_library_custom_loader.c index 4f6e5fe..d0dc4ae 100644 --- a/src/persistence_client_library_custom_loader.c +++ b/src/persistence_client_library_custom_loader.c @@ -17,7 +17,7 @@ */ #include "persistence_client_library_custom_loader.h" -#include "../include_protected/persistence_client_library_data_organization.h" +#include "persistence_client_library_data_organization.h" #include #include @@ -78,7 +78,7 @@ PersistenceCustomLibs_e custom_client_name_to_id(const char* lib_name, int subst } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("custom_libname_to_id - error - id not found for lib:"), DLT_STRING(lib_name)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("custom_libname_to_id - error - id not found for lib:"), DLT_STRING(lib_name)); } } else @@ -113,7 +113,7 @@ PersistenceCustomLibs_e custom_client_name_to_id(const char* lib_name, int subst } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("custom_libname_to_id - error - id not found for lib:"), DLT_STRING(lib_name)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("custom_libname_to_id - error - id not found for lib:"), DLT_STRING(lib_name)); } } @@ -225,25 +225,25 @@ int get_custom_libraries() else { rval = EPERS_CONFIGMAPFAILED; - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load config file error - mapping of file failed")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("load config file error - mapping of file failed")); } close(fd); } else { rval = EPERS_CONFIGNOTAVAILABLE; - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load config file error - no file with plugins available:"), DLT_STRING(filename), DLT_STRING(strerror(errno))); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("load config file error - no file with plugins available:"), DLT_STRING(filename), DLT_STRING(strerror(errno))); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load config file error - invalid file size"), DLT_STRING(filename), DLT_STRING(strerror(errno))); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("load config file error - invalid file size"), DLT_STRING(filename), DLT_STRING(strerror(errno))); } } else { rval = EPERS_CONFIGNOSTAT; - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("lload config file error - can't stat config file:"), DLT_STRING(filename), DLT_STRING(strerror(errno))); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("lload config file error - can't stat config file:"), DLT_STRING(filename), DLT_STRING(strerror(errno))); } return rval; } @@ -268,125 +268,125 @@ int load_custom_library(PersistenceCustomLibs_e customLib, Pers_custom_functs_s *(void **) (&customFuncts->custom_plugin_handle_close) = dlsym(handle, "plugin_handle_close"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_delete_data *(void **) (&customFuncts->custom_plugin_delete_data) = dlsym(handle, "plugin_delete_data"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_get_data *(void **) (&customFuncts->custom_plugin_handle_get_data) = dlsym(handle, "plugin_handle_get_data"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_get_data *(void **) (&customFuncts->custom_plugin_get_data) = dlsym(handle, "plugin_get_data"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_init *(void **) (&customFuncts->custom_plugin_init) = dlsym(handle, "plugin_init"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_deinit *(void **) (&customFuncts->custom_plugin_deinit) = dlsym(handle, "plugin_deinit"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_open *(void **) (&customFuncts->custom_plugin_handle_open) = dlsym(handle, "plugin_handle_open"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_set_data *(void **) (&customFuncts->custom_plugin_handle_set_data) = dlsym(handle, "plugin_handle_set_data"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_set_data *(void **) (&customFuncts->custom_plugin_set_data) = dlsym(handle, "plugin_set_data"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_get_size_handle *(void **) (&customFuncts->custom_plugin_handle_get_size) = dlsym(handle, "plugin_handle_get_size"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_get_size *(void **) (&customFuncts->custom_plugin_get_size) = dlsym(handle, "plugin_get_size"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // create backup *(void **) (&customFuncts->custom_plugin_create_backup) = dlsym(handle, "plugin_create_backup"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // restore backup *(void **) (&customFuncts->custom_plugin_restore_backup) = dlsym(handle, "plugin_restore_backup"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // restore backup *(void **) (&customFuncts->custom_plugin_get_backup) = dlsym(handle, "plugin_get_backup"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // custom_plugin_get_status_notification_clbk *(void **) (&customFuncts->custom_plugin_get_status_notification_clbk) = dlsym(handle, "plugin_get_status_notification_clbk"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // initialize plugin (non blocking) *(void **) (&customFuncts->custom_plugin_init_async) = dlsym(handle, "plugin_init_async"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // clear all data *(void **) (&customFuncts->custom_plugin_clear_all_data) = dlsym(handle, "plugin_clear_all_data"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } // sync data *(void **) (&customFuncts->custom_plugin_sync) = dlsym(handle, "plugin_sync"); if ((error = dlerror()) != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); } } else { error = dlerror(); - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error:"), DLT_STRING(error)); rval = EPERS_DLOPENERROR; } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error: - customLib out of bounds")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("load_custom_library - error: - customLib out of bounds")); rval = EPERS_DLOPENERROR; } diff --git a/src/persistence_client_library_data_organization.c b/src/persistence_client_library_data_organization.c index 12d5eea..4ea78db 100644 --- a/src/persistence_client_library_data_organization.c +++ b/src/persistence_client_library_data_organization.c @@ -16,7 +16,7 @@ * @see */ -#include "../include_protected/persistence_client_library_data_organization.h" +#include "persistence_client_library_data_organization.h" #include #include @@ -63,26 +63,26 @@ const char* gLocalCachePath = CACHEPREFIX "%s"; /// path prefix for local write through database /Data/mnt_wt// const char* gLocalWtPath = WTPREFIX "%s"; /// path prefix for shared cached database: /Data/mnt_c/Shared/Group// -const char* gSharedCachePath = CACHEPREFIX "%s/Shared_Group_%x"; +const char* gSharedCachePath = CACHEPREFIX "%s/shared_group_%x"; /// path prefix for shared write through database: /Data/mnt_wt/Shared/Group// -const char* gSharedWtPath = WTPREFIX "%s/Shared_Group_%x"; +const char* gSharedWtPath = WTPREFIX "%s/shared_group_%x"; /// path prefix for shared public cached database: /Data/mnt_c/Shared/Public// -const char* gSharedPublicCachePath = CACHEPREFIX "%s/Shared_Public"; +const char* gSharedPublicCachePath = CACHEPREFIX "%s/shared_public"; /// path prefix for shared public write through database: /Data/mnt_wt/Shared/Public/ -const char* gSharedPublicWtPath = WTPREFIX "%s/Shared_Public"; +const char* gSharedPublicWtPath = WTPREFIX "%s/shared_public"; /// path prefix for local cached database: /Data/mnt_c// ( const char* gLocalCachePathKey = CACHEPREFIX "%s%s"; /// path prefix for local write through database /Data/mnt_wt// const char* gLocalWtPathKey = WTPREFIX "%s%s"; /// path prefix for shared cached database: /Data/mnt_c/Shared/Group// -const char* gSharedCachePathKey = CACHEPREFIX "%s/Shared_Group_%x%s"; +const char* gSharedCachePathKey = CACHEPREFIX "%s/shared_group_%x%s"; /// path prefix for shared write through database: /Data/mnt_wt/Shared/Group// -const char* gSharedWtPathKey = WTPREFIX "%s/Shared_Group_%x%s"; +const char* gSharedWtPathKey = WTPREFIX "%s/shared_group_%x%s"; /// path prefix for shared public cached database: /Data/mnt_c/Shared/Public// -const char* gSharedPublicCachePathKey = CACHEPREFIX "%s/Shared_Public%s"; +const char* gSharedPublicCachePathKey = CACHEPREFIX "%s/shared_public%s"; /// path prefix for shared public write through database: /Data/mnt_wt/Shared/Public/ -const char* gSharedPublicWtPathKey = WTPREFIX "%s/Shared_Public%s"; +const char* gSharedPublicWtPathKey = WTPREFIX "%s/shared_public%s"; /// path prefix for local cached files: /Data/mnt_c//// const char* gLocalCacheFilePath = CACHEPREFIX "%s/user/%d/seat/%d/%s"; @@ -117,7 +117,7 @@ int gMaxKeyValDataSize = defaultMaxKeyValDataSize; unsigned int gPclInitialized = PCLnotInitialized; -DltContext gDLTContext; +DltContext gPclDLTContext; int(* gChangeNotifyCallback)(pclNotification_s * notifyStruct); diff --git a/include_protected/persistence_client_library_data_organization.h b/src/persistence_client_library_data_organization.h similarity index 87% rename from include_protected/persistence_client_library_data_organization.h rename to src/persistence_client_library_data_organization.h index 17fa9f7..21075b4 100644 --- a/include_protected/persistence_client_library_data_organization.h +++ b/src/persistence_client_library_data_organization.h @@ -29,6 +29,8 @@ extern "C" { #include "../include/persistence_client_library_error_def.h" #include "../include/persistence_client_library_key.h" +#include + #include #include @@ -36,6 +38,46 @@ extern "C" { #include + +/// structure used to manage database context +typedef struct _PersistenceDbContext_s +{ + unsigned int ldbid; + unsigned int user_no; + unsigned int seat_no; +} PersistenceDbContext_s; + +/// persistence information +typedef struct _PersistenceInfo_s +{ + PersistenceDbContext_s context; /**< database context*/ + PersistenceConfigurationKey_s configKey; /**< prct configuration key*/ + +} PersistenceInfo_s; + + +/** storages to manage the data */ +typedef enum PersDefaultType_e_ +{ + PersDefaultType_Configurable = 0, /**< get the data from configurable defaults */ + PersDefaultType_Factory, /**< get the data from factory defaults */ + + /** insert new entries here ... */ + PersDefaultType_LastEntry /**< last entry */ + +} PersDefaultType_e; + +/** storages to manage the data */ +typedef enum PersGetDefault_e_ +{ + PersGetDefault_Data = 0, /**< get the data from configurable defaults */ + PersGetDefault_Size, /**< get the data from factory defaults */ + + /** insert new entries here ... */ + PersGetDefault_LastEntry /**< last entry */ + +} PersGetDefault_e; + /// enumerator used to identify the policy to manage the data typedef enum _PersNotifyRegPolicy_e { @@ -165,7 +207,7 @@ extern char gAppId[MaxAppNameLen]; extern int gMaxKeyValDataSize; /// the DLT context -extern DltContext gDLTContext; +extern DltContext gPclDLTContext; /// flag to indicate if client library has been initialized extern unsigned int gPclInitialized; diff --git a/src/persistence_client_library_db_access.c b/src/persistence_client_library_db_access.c index 3818218..5ecbfac 100644 --- a/src/persistence_client_library_db_access.c +++ b/src/persistence_client_library_db_access.c @@ -17,13 +17,14 @@ * @see */ -#include "../include_protected/persistence_client_library_db_access.h" -#include "../include_protected/persistence_client_library_rc_table.h" +#include "persistence_client_library_db_access.h" #include "persistence_client_library_custom_loader.h" -#include "persistence_client_library_itzam_errors.h" +#include "persistence_client_library_dbus_service.h" #include "persistence_client_library_prct_access.h" -#include "persistence_client_library_dbus_service.h" +#include +#include +#include #include #include @@ -32,237 +33,281 @@ #include -/// definition of a key-value pair stored in the database -typedef struct _KeyValuePair_s -{ - char m_key[DbKeySize]; /// the key - char m_data[DbValueSize]; /// the data - unsigned int m_data_size; /// the size of the data -} -KeyValuePair_s; - - -// definition of a cursor entry -typedef struct _CursorEntry_s -{ - itzam_btree_cursor m_cursor; - itzam_btree m_btree; - int m_empty; -} -CursorEntry_s; - -// cursor array handle -CursorEntry_s gCursorArray[MaxPersHandle]; - -/// handle index -static int gHandleIdx = 1; - -/// free handle array -int gFreeCursorHandleArray[MaxPersHandle]; -// free head index -int gFreeCursorHandleIdxHead = 0; - -// mutex to controll access to the cursor array -pthread_mutex_t gCursorMtx = PTHREAD_MUTEX_INITIALIZER; - /// btree array -static itzam_btree gBtree[DbTableSize][PersistencePolicy_LastEntry]; -static int gBtreeCreated[DbTableSize][PersistencePolicy_LastEntry] = { {0} }; +static int gHandlesDB[DbTableSize][PersistencePolicy_LastEntry]; +static int gHandlesDBCreated[DbTableSize][PersistencePolicy_LastEntry] = { {0} }; // function prototype int pers_send_Notification_Signal(const char* key, PersistenceDbContext_s* context, unsigned int reason); -int pers_get_default_data(char* dbPath, char* key, unsigned char* buffer, unsigned int buffer_size); +char* pers_get_raw_key(char *key) +{ + char *temp = NULL; + char *rawKey = key; + + temp = strrchr(key, (int)'/'); + + if (NULL != temp) + { + rawKey = temp + 1; + } + + return rawKey; +} -int pers_db_open_default(itzam_btree* btree, const char* dbPath, int configDefault) +int pers_db_open_default(const char* dbPath, PersDefaultType_e DefaultType) { - itzam_state state = ITZAM_FAILED; + int ret = 0; char path[DbPathMaxLen] = {0}; - if(1 == configDefault) + if (PersDefaultType_Configurable == DefaultType) { - snprintf(path, DbPathMaxLen, "%s%s", dbPath, gConfigDefault); + snprintf(path, DbPathMaxLen, "%s%s", dbPath, gLocalConfigurableDefault); } - else if(0 == configDefault) + else if (PersDefaultType_Factory== DefaultType) { - snprintf(path, DbPathMaxLen, "%s%s", dbPath, gDefault); + snprintf(path, DbPathMaxLen, "%s%s", dbPath, gLocalFactoryDefault); } else { - return -1; // invalid + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_open_default ==> unknown DefaultType")); + ret = EPERS_COMMON; + } + + if (EPERS_COMMON != ret) + { + ret = persComDbOpen(path, 0); + if (ret < 0) + { + ret = EPERS_COMMON; + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, + DLT_STRING("pers_db_open_default() -> persComDbOpen() -> problem open db: "), + DLT_STRING(path), + DLT_STRING(" Code: "), + DLT_INT(ret)); + } } - state = itzam_btree_open(btree, path, itzam_comparator_string, error_handler, 0/*recover*/, 0/*read_only*/); - if (state != ITZAM_OKAY) + return ret; +} + + +int pers_get_defaults(char* dbPath, char* key, unsigned char* buffer, unsigned int buffer_size, PersGetDefault_e job) +{ + PersDefaultType_e i = PersDefaultType_Configurable; + int handleDefaultDB = -1; + int read_size = EPERS_NOKEY; + + key = pers_get_raw_key(key); /* We need only the raw key without a prefixed '/node/' or '/user/1/seat/0' etc... */ + + for(i=0; i itzam_btree_open => Itzam problem"), DLT_STRING(STATE_MESSAGES[state])); + handleDefaultDB = pers_db_open_default(dbPath, i); + if(handleDefaultDB >= 0) + { + if (PersGetDefault_Data == job) + { + } + else if (PersGetDefault_Size == job) + { + read_size = persComDbGetKeySize(handleDefaultDB, key); + } + else + { + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_get_defaults ==> unknown job")); + break; + } + + if (0 > persComDbClose(handleDefaultDB)) + { + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_get_defaults ==> persComDbClose returned with error")); + } + + if(read_size < 0) // check read_size + { + if (PersDefaultType_Configurable == i) + { + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("Key '"), + DLT_STRING(key), + DLT_STRING("' not found in "), + DLT_STRING(dbPath), + DLT_STRING(gLocalConfigurableDefault)); + } + else if (PersDefaultType_Factory == i) + { + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("Key '"), + DLT_STRING(key), + DLT_STRING("' not found in "), + DLT_STRING(dbPath), + DLT_STRING(gLocalFactoryDefault)); + } + else + { + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_get_defaults ==> unknown PersDefaultType: "), + DLT_INT(i)); + } + + if(PERS_COM_ERR_NOT_FOUND == read_size) + { + read_size = EPERS_NOKEY; + } + } + else + { + break; + } + } } - return 1; + return read_size; + } -itzam_btree* pers_db_open(PersistenceInfo_s* info, const char* dbPath) +int database_get(PersistenceInfo_s* info, const char* dbPath) { int arrayIdx = 0; - itzam_btree* btree = NULL; + int handleDB = -1; // create array index: index is a combination of resource config table type and group - arrayIdx = info->configKey.storage + info->context.ldbid; + arrayIdx = info->configKey.storage + info->context.ldbid ; //if(arrayIdx <= DbTableSize) if(arrayIdx < DbTableSize) { - if(gBtreeCreated[arrayIdx][info->configKey.policy] == 0) + if(gHandlesDBCreated[arrayIdx][info->configKey.policy] == 0) { - itzam_state state = ITZAM_FAILED; + char path[DbPathMaxLen] = {0}; if(PersistencePolicy_wt == info->configKey.policy) { - snprintf(path, DbPathMaxLen, "%s%s", dbPath, gWt); + snprintf(path, DbPathMaxLen, "%s%s", dbPath, gLocalWt); } else if(PersistencePolicy_wc == info->configKey.policy) { - snprintf(path, DbPathMaxLen, "%s%s", dbPath, gCached); + snprintf(path, DbPathMaxLen, "%s%s", dbPath, gLocalCached); } else { - return btree; + handleDB = -2; } - state = itzam_btree_open(&gBtree[arrayIdx][info->configKey.policy], path, - itzam_comparator_string, error_handler, 0/*recover*/, 0/*read_only*/); - if (state != ITZAM_OKAY) + if (handleDB == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_open ==> itzam_btree_open => Itzam problem"), DLT_STRING(STATE_MESSAGES[state])); + handleDB = persComDbOpen(path, 0x01); + if(handleDB >= 0) + { + gHandlesDB[arrayIdx][info->configKey.policy] = handleDB ; + gHandlesDBCreated[arrayIdx][info->configKey.policy] = 1; + } + else + { + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("database_get ==> persComDbOpen() failed")); + } + } + else + { + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("database_get ==> wrong policy! Cannot extend dbPath wit database.")); } - gBtreeCreated[arrayIdx][info->configKey.policy] = 1; } - // assign database - btree = &gBtree[arrayIdx][info->configKey.policy]; + else + { + handleDB = gHandlesDB[arrayIdx][info->configKey.policy]; + } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_open ==> invalid storage type"), DLT_STRING(dbPath)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("database_get ==> invalid storage type"), DLT_STRING(dbPath)); } - return btree; -} -void pers_db_close(PersistenceInfo_s* info) + return handleDB; +} + + +void database_close(PersistenceInfo_s* info) { int arrayIdx = info->configKey.storage + info->context.ldbid; if(info->configKey.storage <= PersistenceStorage_shared ) { - itzam_state state = ITZAM_FAILED; - state = itzam_btree_close(&gBtree[arrayIdx][info->configKey.policy]); - if (state != ITZAM_OKAY) + int iErrorCode = persComDbClose(gHandlesDB[arrayIdx][info->configKey.policy]) ; + if (iErrorCode < 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_close ==> itzam_btree_close => Itzam problem"), DLT_STRING(STATE_MESSAGES[state])); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("database_close ==> persComDbClose() failed")); + } + else + { + gHandlesDBCreated[arrayIdx][info->configKey.policy] = 0; } - gBtreeCreated[arrayIdx][info->configKey.policy] = 0; } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_close ==> invalid storage type"), DLT_INT(info->context.ldbid )); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("database_close ==> invalid storage type"), DLT_INT(info->context.ldbid )); } } - - -void pers_db_close_all() +void database_close_all() { int i = 0; for(i=0; i itzam_btree_close => Itzam problem:"), DLT_STRING(STATE_MESSAGES[state]) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("database_close_all => failed to close db => persComDbClose")); + } + else + { + gHandlesDBCreated[i][PersistencePolicy_wc] = 0; } - gBtreeCreated[i][PersistencePolicy_wc] = 0; } // close write through database - if(gBtreeCreated[i][PersistencePolicy_wt] == 1) + if(gHandlesDBCreated[i][PersistencePolicy_wt] == 1) { - itzam_state state = ITZAM_FAILED; - state = itzam_btree_close(&gBtree[i][PersistencePolicy_wt]); - if (state != ITZAM_OKAY) + int iErrorCode = persComDbClose(gHandlesDB[i][PersistencePolicy_wt]); + if (iErrorCode < 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_close_all ==>itzam_btree_close => Itzam problem:"), DLT_STRING(STATE_MESSAGES[state])); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("database_close_all => failed to close db => persComDbClose")); } - gBtreeCreated[i][PersistencePolicy_wt] = 0; - } - } -} - - -void pers_rct_close_all() -{ - int i = 0; - itzam_btree* resourceTable = NULL; - itzam_state state = ITZAM_FAILED; - - // close open persistence resource configuration table - for(i=0; i< PrctDbTableSize; i++) - { - resourceTable = (itzam_btree*)get_resource_cfg_table_by_idx(i); - // dereference opend database - if(resourceTable != NULL && get_resource_cfg_table_status(i) == 1) - { - state = itzam_btree_close(resourceTable); - invalidate_resource_cfg_table(i); - if (state != ITZAM_OKAY) + else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("process_prepare_shutdown => itzam_btree_close: Itzam problem"), DLT_STRING(STATE_MESSAGES[state])); + gHandlesDBCreated[i][PersistencePolicy_wt] = 0; } } } } -int pers_db_read_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned char* buffer, unsigned int buffer_size) + + +int persistence_get_data(char* dbPath, char* key, PersistenceInfo_s* info, unsigned char* buffer, unsigned int buffer_size) { int read_size = -1; + int ret_defaults = -1; if( PersistenceStorage_shared == info->configKey.storage || PersistenceStorage_local == info->configKey.storage) { - itzam_btree* btree = NULL; - int keyFound = 0; - - btree = pers_db_open(info, dbPath); - if(btree != NULL) + int handleDB = database_get(info, dbPath); + if(handleDB >= 0) { - KeyValuePair_s search; - - if(itzam_true == itzam_btree_find(btree, key, &search)) + read_size = persComDbReadKey(handleDB, key, (char*)buffer, buffer_size) ; + if(read_size < 0) { - read_size = search.m_data_size; - if(read_size > buffer_size) - { - read_size = buffer_size; // truncate data size to buffer size - } - memcpy(buffer, search.m_data, read_size); - keyFound = 1; + read_size = pers_get_defaults(dbPath, key, buffer, buffer_size, PersGetDefault_Data); /* 0 ==> Get data */ } } - if(keyFound == 0) // check for default values. - { - read_size = pers_get_default_data(dbPath, key, buffer, buffer_size); - } } else if(PersistenceStorage_custom == info->configKey.storage) // custom storage implementation via custom library { @@ -282,90 +327,25 @@ int pers_db_read_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned snprintf(pathKeyString, 128, "0x%08X/%s", info->context.ldbid, info->configKey.customID); } read_size = gPersCustomFuncs[idx].custom_plugin_get_data(pathKeyString, (char*)buffer, buffer_size); - - if(read_size < 0) // check if for custom storage default values are available - { - read_size = pers_get_default_data(dbPath, key, buffer, buffer_size); - } } else { read_size = EPERS_NOPLUGINFUNCT; } - } - return read_size; -} - - -int pers_get_default_data(char* dbPath, char* key, unsigned char* buffer, unsigned int buffer_size) -{ - int keyFound = 0; - int read_size = 0; - KeyValuePair_s search; - - itzam_state state = ITZAM_FAILED; - itzam_btree btreeConfDefault; - itzam_btree btreeDefault; - - // 1. check if _configurable_ default data is available - // -------------------------------- - if(pers_db_open_default(&btreeConfDefault, dbPath, 1) != -1) - { - if(itzam_true == itzam_btree_find(&btreeConfDefault, key, &search)) // read db + if (1 > read_size) { - read_size = search.m_data_size; - if(read_size > buffer_size) + info->configKey.policy = PersistencePolicy_wc; /* Set the policy */ + info->configKey.type = PersistenceResourceType_key; /* Set the type */ + (void)get_db_path_and_key(info, key, NULL, dbPath); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("Custom Key not available. Try to get default keys from:"), + DLT_STRING(dbPath), + DLT_STRING(key)); + ret_defaults = pers_get_defaults(dbPath, key, buffer, buffer_size, PersGetDefault_Data); + if (0 < ret_defaults) { - read_size = buffer_size; // truncate data size to buffer size + read_size = ret_defaults; } - memcpy(buffer, search.m_data, read_size); - - keyFound = 1; - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_read_key ==> 2. resource not found in default config => search in default db"), DLT_STRING(key)); - } - - state = itzam_btree_close(&btreeConfDefault); - if (state != ITZAM_OKAY) - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_read_key ==> default: itzam_btree_close => Itzam problem"), DLT_STRING(STATE_MESSAGES[state])); - } - } - - // 2. check if default data is available - // -------------------------------- - if(keyFound == 0) - { - if(pers_db_open_default(&btreeDefault, dbPath, 0) != -1) - { - if(itzam_true == itzam_btree_find(&btreeDefault, key, &search)) // read db - { - read_size = search.m_data_size; - if(read_size > buffer_size) - { - read_size = buffer_size; // truncate data size to buffer size - } - memcpy(buffer, search.m_data, read_size); - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_read_key ==> 3. reasoure not found in both default db's"), DLT_STRING(key) ); - read_size = EPERS_NOKEY; // the key is not available neither in regular db nor in the default db's - } - - state = itzam_btree_close(&btreeDefault); - if (state != ITZAM_OKAY) - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_read_key ==> default: itzam_btree_close => Itzam problem"), DLT_STRING(STATE_MESSAGES[state])); - } - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_read_key ==>no resource config table"), DLT_STRING(dbPath), DLT_STRING(key) ); - read_size = EPERS_NOPRCTABLE; } } return read_size; @@ -373,85 +353,39 @@ int pers_get_default_data(char* dbPath, char* key, unsigned char* buffer, unsign -int pers_db_write_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned char* buffer, unsigned int buffer_size) +int persistence_set_data(char* dbPath, char* key, PersistenceInfo_s* info, unsigned char* buffer, unsigned int buffer_size) { int write_size = -1; if( PersistenceStorage_local == info->configKey.storage || PersistenceStorage_shared == info->configKey.storage ) { - write_size = buffer_size; - itzam_btree* btree = NULL; - itzam_state state = ITZAM_FAILED; - KeyValuePair_s insert; + int handleDB = -1 ; + - btree = pers_db_open(info, dbPath); - if(btree != NULL) + handleDB = database_get(info, dbPath); + if(handleDB >= 0) { - int keySize = 0; - keySize = (int)strlen((const char*)key); - if(keySize < DbKeySize) + write_size = persComDbWriteKey(handleDB, key, (char*)buffer, buffer_size) ; + if(write_size < 0) { - int dataSize = 0; - dataSize = (int)strlen( (const char*)buffer); - if(dataSize < DbValueSize) - { - // ----------------------------------------------------------------------------- - // transaction start - // itzam_btree_transaction_start(btree); - - // key - memset(insert.m_key, 0, DbKeySize); - memcpy(insert.m_key, key, keySize); - if(itzam_true == itzam_btree_find(btree, key, &insert)) - { - // key already available, so delete "old" key - state = itzam_btree_remove(btree, (const void *)&insert); - } - - // data - memset(insert.m_data, 0, DbValueSize); - memcpy(insert.m_data, buffer, dataSize); - - // data size - insert.m_data_size = buffer_size; - - state = itzam_btree_insert(btree,(const void *)&insert); - if (state != ITZAM_OKAY) - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_write_key ==> itzam_btree_insert => Itzam problem"), DLT_STRING(STATE_MESSAGES[state]) ); - write_size = EPERS_DB_ERROR_INTERNAL; - } - - // itzam_btree_transaction_commit(btree); - // transaction end - // ----------------------------------------------------------------------------- - - if(PersistenceStorage_shared == info->configKey.storage) - { - int rval = pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_changed); - if(rval <= 0) - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_write_key ==> failed to send notification signal")); - write_size = rval; - } - } - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_write_key ==> data to long » size:"), DLT_INT(dataSize), DLT_INT(DbValueSize) ); - write_size = EPERS_DB_VALUE_SIZE; - } + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_set_data ==> persComDbWriteKey() failure")); } - else + + if(PersistenceStorage_shared == info->configKey.storage) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_write_key ==> key to long » size"), DLT_INT(keySize), DLT_INT(DbKeySize) ); - write_size = EPERS_DB_KEY_SIZE; + int rval = pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_changed); + if(rval <= 0) + { + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_set_data ==> failed to send notification signal")); + write_size = rval; + } } + } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_write_key ==> no resource config table"), DLT_STRING(dbPath), DLT_STRING(key)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_set_data ==> no resource config table"), DLT_STRING(dbPath), DLT_STRING(key)); write_size = EPERS_NOPRCTABLE; } } @@ -471,12 +405,12 @@ int pers_db_write_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned } write_size = gPersCustomFuncs[idx].custom_plugin_set_data(pathKeyString, (char*)buffer, buffer_size); - if(write_size >= 0) // success ==> send deleted notification + if (write_size == buffer_size) /* Check return value and send notification if OK */ { int rval = pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_changed); if(rval <= 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_write_key ==> failed to send notification signal")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_set_data ==> failed to send notification signal")); write_size = rval; } } @@ -491,44 +425,22 @@ int pers_db_write_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned -int pers_db_get_key_size(char* dbPath, char* key, PersistenceInfo_s* info) +int persistence_get_data_size(char* dbPath, char* key, PersistenceInfo_s* info) { int read_size = -1; + int ret_defaults = -1; if( PersistenceStorage_shared == info->configKey.storage || PersistenceStorage_local == info->configKey.storage) { - int keySize = 0; - itzam_btree* btree = NULL; - KeyValuePair_s search; - - btree = pers_db_open(info, dbPath); - if(btree != NULL) + int handleDB = database_get(info, dbPath); + if(handleDB >= 0) { - keySize = (int)strlen((const char*)key); - if(keySize < DbKeySize) + read_size = persComDbGetKeySize(handleDB, key); + if(read_size < 0) { - memset(search.m_key,0, DbKeySize); - memcpy(search.m_key, key, keySize); - if(itzam_true == itzam_btree_find(btree, key, &search)) - { - read_size = search.m_data_size; - } - else - { - read_size = EPERS_NOKEY; - } + read_size = pers_get_defaults(dbPath, key, NULL, 0, PersGetDefault_Size); } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_get_key_size ==> key to long"), DLT_INT(keySize), DLT_INT(DbKeySize)); - read_size = EPERS_DB_KEY_SIZE; - } - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_get_key_size ==> no config table"), DLT_STRING(dbPath), DLT_STRING(key)); - read_size = EPERS_NOPRCTABLE; } } else if(PersistenceStorage_custom == info->configKey.storage) // custom storage implementation via custom library @@ -551,59 +463,57 @@ int pers_db_get_key_size(char* dbPath, char* key, PersistenceInfo_s* info) { read_size = EPERS_NOPLUGINFUNCT; } + + if (1 > read_size) + { + info->configKey.policy = PersistencePolicy_wc; /* Set the policy */ + info->configKey.type = PersistenceResourceType_key; /* Set the type */ + (void)get_db_path_and_key(info, key, NULL, dbPath); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("Custom Key not available. Try to get default keys from:"), + DLT_STRING(dbPath), + DLT_STRING(key)); + ret_defaults = pers_get_defaults(dbPath, key, NULL, 0, PersGetDefault_Size); + if (0 < ret_defaults) + { + read_size = ret_defaults; + } + } } return read_size; } -int pers_db_delete_key(char* dbPath, char* key, PersistenceInfo_s* info) +int persistence_delete_data(char* dbPath, char* key, PersistenceInfo_s* info) { int ret = 0; if(PersistenceStorage_custom != info->configKey.storage) { - itzam_btree* btree = NULL; - KeyValuePair_s delete; - - btree = pers_db_open(info, dbPath); - if(btree != NULL) + int handleDB = database_get(info, dbPath); + if(handleDB >= 0) { - int keySize = 0; - keySize = (int)strlen((const char*)key); - if(keySize < DbKeySize) + ret = persComDbDeleteKey(handleDB, key) ; + if(ret < 0) { - // ----------------------------------------------------------------------------- - // transaction start - itzam_btree_transaction_start(btree); - - itzam_state state; - - memset(delete.m_key,0, DbKeySize); - memcpy(delete.m_key, key, keySize); - state = itzam_btree_remove(btree, (const void *)&delete); - if (state != ITZAM_OKAY) + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_delete_data => persComDbDeleteKey failed: "), DLT_STRING(key)); + if(PERS_COM_ERR_NOT_FOUND == ret) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_delete_key ==> itzam_btree_remove => Itzam problem"), DLT_STRING(STATE_MESSAGES[state])); - ret = EPERS_DB_ERROR_INTERNAL; + ret = EPERS_NOKEY ; } - itzam_btree_transaction_commit(btree); - // transaction end - // ----------------------------------------------------------------------------- - - if(PersistenceStorage_shared == info->configKey.storage) + else { - ret = pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_deleted); + ret = EPERS_DB_ERROR_INTERNAL ; } } - else + + if(PersistenceStorage_shared == info->configKey.storage) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_delete_key ==> key to long"), DLT_INT(keySize), DLT_INT(DbKeySize)); - ret = EPERS_DB_KEY_SIZE; + pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_deleted); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_delete_key ==> no resource config table"), DLT_STRING(dbPath), DLT_STRING(key)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_delete_data ==> no resource config table"), DLT_STRING(dbPath), DLT_STRING(key)); ret = EPERS_NOPRCTABLE; } } @@ -622,9 +532,10 @@ int pers_db_delete_key(char* dbPath, char* key, PersistenceInfo_s* info) snprintf(pathKeyString, 128, "0x%08X/%s", info->context.ldbid, info->configKey.customID); } ret = gPersCustomFuncs[idx].custom_plugin_delete_data(pathKeyString); - if(ret >= 0) // success ==> send deleted notification + + if(0 <= ret) /* Check return value and send notification if OK */ { - ret = pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_deleted); + pers_send_Notification_Signal(key, &info->context, pclNotifyStatus_deleted); } } else @@ -662,7 +573,7 @@ int persistence_notify_on_change(char* key, unsigned int ldbid, unsigned int use if(-1 == deliverToMainloop(CMD_REG_NOTIFY_SIGNAL, 0, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_notify_on_change => failed to write to pipe"), DLT_INT(errno)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_notify_on_change => failed to write to pipe"), DLT_INT(errno)); rval = -1; } } @@ -693,7 +604,7 @@ int pers_send_Notification_Signal(const char* key, PersistenceDbContext_s* conte if(-1 == deliverToMainloop(CMD_SEND_NOTIFY_SIGNAL, 0,0) ) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_send_Notification_Signal => failed to write to pipe"), DLT_INT(errno)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_send_Notification_Signal => failed to write to pipe"), DLT_INT(errno)); rval = EPERS_NOTIFY_SIG; } } @@ -706,278 +617,18 @@ int pers_send_Notification_Signal(const char* key, PersistenceDbContext_s* conte } -//--------------------------------------------------------------------------------------------------------- -// C U R S O R F U N C T I O N S -//--------------------------------------------------------------------------------------------------------- - -int get_cursor_handle() -{ - int handle = 0; - - if(pthread_mutex_lock(&gCursorMtx) == 0) - { - if(gFreeCursorHandleIdxHead > 0) // check if we have a free spot in the array before the current max - { - handle = gFreeCursorHandleArray[--gFreeCursorHandleIdxHead]; - } - else - { - if(gHandleIdx < MaxPersHandle-1) - { - handle = gHandleIdx++; // no free spot before current max, increment handle index - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("get_cursor_handle ==> Reached maximum of open handles:"), DLT_INT(MaxPersHandle)); - handle = -1; - } - } - pthread_mutex_unlock(&gCursorMtx); - } - return handle; -} - - -void close_cursor_handle(int handlerDB) -{ - if(pthread_mutex_lock(&gCursorMtx) == 0) - { - if(gFreeCursorHandleIdxHead < MaxPersHandle) - { - gFreeCursorHandleArray[gFreeCursorHandleIdxHead++] = handlerDB; - } - pthread_mutex_unlock(&gCursorMtx); - } -} - - - -int pers_db_cursor_create(char* dbPath) -{ - int handle = -1; - itzam_state state = ITZAM_FAILED; - - handle = get_cursor_handle(); - - if(handle < MaxPersHandle && handle >= 0) - { - // open database - state = itzam_btree_open(&gCursorArray[handle].m_btree, dbPath, itzam_comparator_string, error_handler, 1/*recover*/, 0/*read_only*/); - if (state != ITZAM_OKAY) - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_cursor_create ==> itzam_btree_open"), DLT_STRING(STATE_MESSAGES[state])); - } - else - { - itzam_state state; - - state = itzam_btree_cursor_create(&gCursorArray[handle].m_cursor, &gCursorArray[handle].m_btree); - if(state == ITZAM_OKAY) - { - gCursorArray[handle].m_empty = 0; - } - else - { - gCursorArray[handle].m_empty = 1; - } - } - } - return handle; -} - - - -int pers_db_cursor_next(unsigned int handlerDB) -{ - int rval = -99; - - //if(handlerDB < MaxPersHandle && handlerDB >= 0) - if(handlerDB < MaxPersHandle ) - { - if(gCursorArray[handlerDB].m_empty != 1) - { - itzam_bool success; - success = itzam_btree_cursor_next(&gCursorArray[handlerDB].m_cursor); - - if(success == itzam_true) - { - rval = 0; - } - else - { - rval = EPERS_LAST_ENTRY_IN_DB; - } - } - else - { - printf("Invalid handle\n"); - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_cursor_next ==> invalid handle: "), DLT_INT(handlerDB)); - } - } - else - { - printf("Handle bigger than max\n"); - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_cursor_next ==> handle bigger than max:"), DLT_INT(MaxPersHandle)); - } - return rval; -} - - - -int pers_db_cursor_get_key(unsigned int handlerDB, char * bufKeyName_out, int bufSize) -{ - int rval = -1; - KeyValuePair_s search; - - if(handlerDB < MaxPersHandle) - { - if(gCursorArray[handlerDB].m_empty != 1) - { - int length = 0; - itzam_btree_cursor_read(&gCursorArray[handlerDB].m_cursor ,(void *)&search); - length = strlen(search.m_key); - if(length < bufSize) - { - memcpy(bufKeyName_out, search.m_key, length); - rval = 0; - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_cursor_get_key ==> buffer to small » keySize: "), DLT_INT(bufSize)); - } - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_db_cursor_get_key ==> invalid handle:"), DLT_INT(handlerDB)); - } - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_db_cursor_get_key ==> handle bigger than max:"), DLT_INT(MaxPersHandle)); - } - return rval; -} - - - -int pers_db_cursor_get_data(unsigned int handlerDB, char * bufData_out, int bufSize) -{ - int rval = -1; - KeyValuePair_s search; - - if(handlerDB < MaxPersHandle) - { - if(gCursorArray[handlerDB].m_empty != 1) - { - int length = 0; - itzam_btree_cursor_read(&gCursorArray[handlerDB].m_cursor ,(void *)&search); - - length = strlen(search.m_data); - if(length < bufSize) - { - memcpy(bufData_out, search.m_data, length); - rval = 0; - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_cursor_get_data ==> buffer to small » keySize: "), DLT_INT(bufSize)); - } - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_db_cursor_get_data ==> invalid handle:"), DLT_INT(handlerDB)); - } - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_db_cursor_get_data ==> handle bigger than max:"), DLT_INT(MaxPersHandle)); - } - return rval; -} - - - -int pers_db_cursor_get_data_size(unsigned int handlerDB) +void pers_rct_close_all() { - int size = -1; - KeyValuePair_s search; + int i = 0, rval = 0; - if(handlerDB < MaxPersHandle) - { - if(gCursorArray[handlerDB].m_empty != 1) - { - itzam_btree_cursor_read(&gCursorArray[handlerDB].m_cursor ,(void *)&search); - size = strlen(search.m_data); - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_cursor_get_data_size ==> invalid handle:"), DLT_INT(handlerDB)); - } - } - else - { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("persistence_db_cursor_get_data ==> handle bigger than max:"), DLT_INT(MaxPersHandle)); - } - return size; -} - - - -int pers_db_cursor_destroy(unsigned int handlerDB) -{ - int rval = -1; - if(handlerDB < MaxPersHandle) + // close open persistence resource configuration table + for(i=0; i< PrctDbTableSize; i++) { - itzam_btree_cursor_free(&gCursorArray[handlerDB].m_cursor); - gCursorArray[handlerDB].m_empty = 1; - - itzam_state state = ITZAM_FAILED; - state = itzam_btree_close(&gCursorArray[handlerDB].m_btree); - if (state != ITZAM_OKAY) + rval = persComRctClose(i); + if (rval != 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pers_db_cursor_destroy ==> itzam_btree_close: Itzam problem"), DLT_STRING(STATE_MESSAGES[state])); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("process_prepare_shutdown => failed to close db:"), DLT_INT(rval)); } - - close_cursor_handle(handlerDB); - - rval = 0; } - return rval; } - - - -//----------------------------------------------------------------------------- -// code to print database content (for debugging) -//----------------------------------------------------------------------------- -// walk the database -/* -KeyValuePair_s rec; -itzam_btree_cursor cursor; -state = itzam_btree_cursor_create(&cursor, &btree); -if(state == ITZAM_OKAY) -{ - printf("==> Database content ==> db size: %d\n", (int)itzam_btree_count(&btree)); - do - { - // get the key pointed to by the cursor - state = itzam_btree_cursor_read(&cursor,(void *)&rec); - if (state == ITZAM_OKAY) - { - printf(" Key: %s \n ==> data: %s\n", rec.m_key, rec.m_data); - } - else - fprintf(stderr, "\nItzam problem: %s\n", STATE_MESSAGES[state]); - } - while (itzam_btree_cursor_next(&cursor)); - - state = itzam_btree_cursor_free(&cursor); -} -*/ -//----------------------------------------------------------------------------- - - - - - diff --git a/include_protected/persistence_client_library_db_access.h b/src/persistence_client_library_db_access.h similarity index 59% rename from include_protected/persistence_client_library_db_access.h rename to src/persistence_client_library_db_access.h index 3c560f6..2cb7076 100644 --- a/include_protected/persistence_client_library_db_access.h +++ b/src/persistence_client_library_db_access.h @@ -28,10 +28,54 @@ extern "C" { #include "persistence_client_library_data_organization.h" -#include "persistence_client_library_rc_table.h" + +//#include "persistence_client_library_rc_table.h" +#include + #include "../include/persistence_client_library_key.h" + +/** + * @brief get the raw key without prefixed '/node/', '/user/3/' etc + * + * @param key the ptr. to the key which should be stripped + * + * @return the pointer to the stripped 'raw key' + */ +char* pers_get_raw_key(char *key); + + + +/** + * @brief open the default value database specified by the 'DefaultType' + * + * @param dbPath path to the directory were the databases are included in. + * + * @return >= 0 for valid handler; if an error occured the following error code: + * EPERS_COMMON + */ +int pers_db_open_default(const char* dbPath, PersDefaultType_e DefaultType); + + + +/** + * @brief tries to get default values for a key from the configurable and factory default databases. + * + * @param dbPath the path to the directory where the default databases are in + * @param key the database key + * @param buffer the buffer holding the data + * @param buffer_size the size of the buffer + * @param job the info to specify what to do. Get Data or the DataSize. + * + * @return the number of bytes read or the size of the key (depends on parameter 'job'). + negative value if an error occured and the following error code: + * EPERS_NOKEY + */ +int pers_get_defaults(char* dbPath, char* key, unsigned char* buffer, unsigned int buffer_size, PersGetDefault_e job); + + + /** * @brief write data to a key * @@ -44,7 +88,7 @@ extern "C" { * @return the number of bytes written or a negative value if an error occured with the following error codes: * EPERS_SETDTAFAILED EPERS_NOPRCTABLE EPERS_NOKEYDATA EPERS_NOKEY */ -int pers_db_write_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned char* buffer, unsigned int buffer_size); +int persistence_set_data(char* dbPath, char* key, PersistenceInfo_s* info, unsigned char* buffer, unsigned int buffer_size); @@ -60,7 +104,7 @@ int pers_db_write_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned * @return the number of bytes read or a negative value if an error occured with the following error codes: * EPERS_NOPRCTABLE EPERS_NOKEYDATA EPERS_NOKEY */ -int pers_db_read_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned char* buffer, unsigned int buffer_size); +int persistence_get_data(char* dbPath, char* key, PersistenceInfo_s* info, unsigned char* buffer, unsigned int buffer_size); @@ -74,7 +118,7 @@ int pers_db_read_key(char* dbPath, char* key, PersistenceInfo_s* info, unsigned * @return size of data in bytes read from the key or on error a negative value with the following error codes: * EPERS_NOPRCTABLE or EPERS_NOKEY */ -int pers_db_get_key_size(char* dbPath, char* key, PersistenceInfo_s* info); +int persistence_get_data_size(char* dbPath, char* key, PersistenceInfo_s* info); @@ -88,7 +132,7 @@ int pers_db_get_key_size(char* dbPath, char* key, PersistenceInfo_s* info); * @return 0 if deletion was successfull; * or an error code: EPERS_DB_KEY_SIZE, EPERS_NOPRCTABLE, EPERS_DB_ERROR_INTERNAL or EPERS_NOPLUGINFUNCT */ -int pers_db_delete_key(char* dbPath, char* key, PersistenceInfo_s* info); +int persistence_delete_data(char* dbPath, char* key, PersistenceInfo_s* info); @@ -97,20 +141,15 @@ int pers_db_delete_key(char* dbPath, char* key, PersistenceInfo_s* info); * * @param info persistence information */ -void pers_db_close(PersistenceInfo_s* info); +void database_close(PersistenceInfo_s* info); /** * @brief close all databases */ -void pers_db_close_all(); - +void database_close_all(); -/** - * @brief close all rct's - */ -void pers_rct_close_all(); /** @@ -118,7 +157,7 @@ void pers_rct_close_all(); * * @param key the database key to register on * @param ldbid logical database ID of the resource to monitor - * @param user_no the user ID; user_no=0 can not be used as user-ID beacause ‘0’ is defined as System/node + * @param user_no the user ID; user_no=0 can not be used as user-ID beacause '0' is defined as System/node * @param seat_no the seat number * @param callback the function callback to be called * @param regPolic ::Notify_register to register; ::Notify_unregister to unregister @@ -141,70 +180,8 @@ int persistence_notify_on_change(char* key, unsigned int ldbid, unsigned int use */ int pers_send_Notification_Signal(const char* key, PersistenceDbContext_s* context, pclNotifyStatus_e reason); -//--------------------------------------------------------------------------------------------- -// C U R S O R F U N C T I O N S -//--------------------------------------------------------------------------------------------- - -/** - * @brief create a cursor to a DB ; if success, the cursor points to (-1) - * to access the first entry in DB, call persistence_db_cursor_next - * - * @param dbPath[in] absolute path to the database - * - * @return handler to the DB (to be used in successive calls) or error code (< 0) - */ -int pers_db_cursor_create(char* dbPath); - -/** - * @brief move cursor to the next position - * - * @param handlerDB[in] handler to DB (obtained with persistence_db_cursor_create()) - * - * @return 0 for success, negative value in case of error (check against EPERS_LAST_ENTRY_IN_DB) - */ -int pers_db_cursor_next(unsigned int handlerDB); - -/** - * @brief get the name of the key pointed by the cursor associated with the database - * - * @param handlerDB[in] handler to DB (obtained with persistence_db_cursor_create()) - * @param bufKeyName_out[out] buffer where to pass the name of the key - * @param bufSize[out] size of bufKeyName_out - * - * @return read size (if >= 0), error other way - */ -int pers_db_cursor_get_key(unsigned int handlerDB, char * bufKeyName_out, int bufSize) ; - -/** - * @brief get the data of the key pointed by the cursor associated with the database - * - * @param handlerDB[in] handler to DB (obtained with persistence_db_cursor_create()) - * @param bufKeyData_out[out] buffer where to pass the data of the key - * @param bufSize[out] size of bufKeyData_out - * - * @return read size (if >= 0), error other way - */ -int pers_db_cursor_get_data(unsigned int handlerDB, char * bufData_out, int bufSize) ; - -/** - * @brief get the data size of the key pointed by the cursor associated with the database - * - * @param handlerDB[in] handler to DB (obtained with persistence_db_cursor_create()) - * - * @return positive value for data size, negative value for error - */ -int pers_db_cursor_get_data_size(unsigned int handlerDB) ; - - -/** - * @brief remove the cursor - * - * @param handlerDB[in] handler to DB (obtained with persistence_db_cursor_create()) - * - * @return 0 for success, negative value in case of error - */ -int pers_db_cursor_destroy(unsigned int handlerDB) ; +void pers_rct_close_all(); #ifdef __cplusplus } diff --git a/src/persistence_client_library_dbus_cmd.c b/src/persistence_client_library_dbus_cmd.c index c8a138c..e64dfe8 100644 --- a/src/persistence_client_library_dbus_cmd.c +++ b/src/persistence_client_library_dbus_cmd.c @@ -19,15 +19,12 @@ #include "persistence_client_library_dbus_cmd.h" #include "persistence_client_library_handle.h" -#include "persistence_client_library_itzam_errors.h" #include "persistence_client_library_custom_loader.h" -#include "persistence_client_library_prct_access.h" #include "persistence_client_library_pas_interface.h" -#include "../include_protected/persistence_client_library_data_organization.h" -#include "../include_protected/persistence_client_library_db_access.h" +#include "persistence_client_library_data_organization.h" +#include "persistence_client_library_db_access.h" -#include #include @@ -136,22 +133,22 @@ void process_send_notification_signal(DBusConnection* conn) } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_Notification_Signal ==> failed to send dbus message!!")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_Notification_Signal ==> failed to send dbus message!!")); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_Notification_Signal ==> E R R O R C O N E C T I O N NULL!!")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_Notification_Signal ==> E R R O R C O N E C T I O N NULL!!")); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_Notification_Signal ==> ERROR dbus_message_append_args")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_Notification_Signal ==> ERROR dbus_message_append_args")); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_Notification_Signal ==> ERROR invalid notification reason")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_Notification_Signal ==> ERROR invalid notification reason")); } } @@ -159,6 +156,8 @@ void process_send_notification_signal(DBusConnection* conn) void process_block_and_write_data_back(unsigned int requestID, unsigned int status) { + (void)requestID; + (void)status; // lock persistence data access pers_lock_access(); // sync data back to memory device @@ -173,6 +172,9 @@ void process_prepare_shutdown(unsigned char requestId, unsigned int status) { int i = 0; + (void)requestId; + (void)status; + // block write pers_lock_access(); @@ -191,7 +193,7 @@ void process_prepare_shutdown(unsigned char requestId, unsigned int status) pers_rct_close_all(); // close opend database - pers_db_close_all(); + database_close_all(); // unload custom client libraries @@ -230,7 +232,7 @@ void process_send_pas_request(DBusConnection* conn, unsigned int requestID, int if(!dbus_connection_send(conn, message, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_register => Access denied"), DLT_STRING(error.message) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_register => Access denied"), DLT_STRING(error.message) ); } dbus_connection_flush(conn); @@ -238,12 +240,12 @@ void process_send_pas_request(DBusConnection* conn, unsigned int requestID, int } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_request => ERROR: Invalid message") ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_request => ERROR: Invalid message") ); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_request => ERROR: Invalid connection") ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_request => ERROR: Invalid connection") ); } } @@ -290,24 +292,24 @@ void process_send_pas_register(DBusConnection* conn, int regType, int notificati if(!dbus_pending_call_set_notify(pending, msg_pending_func, method, NULL)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_pas_register => dbus_pending_call_set_notify: FAILED\n") ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("process_send_pas_register => dbus_pending_call_set_notify: FAILED\n") ); } dbus_pending_call_unref(pending); } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_register => ERROR: Invalid message") ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_register => ERROR: Invalid message") ); } dbus_message_unref(message); } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_register => ERROR: Invalid busname") ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_register => ERROR: Invalid busname") ); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_register => ERROR: Invalid connection") ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_pas_register => ERROR: Invalid connection") ); } } @@ -351,19 +353,19 @@ void process_send_lifecycle_register(DBusConnection* conn, int regType, int shut if(!dbus_connection_send(conn, message, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_register => Access denied"), DLT_STRING(error.message) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_register => Access denied"), DLT_STRING(error.message) ); } dbus_connection_flush(conn); dbus_message_unref(message); } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_register => ERROR: Invalid message")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_register => ERROR: Invalid message")); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_register => ERROR: connection isn NULL")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_register => ERROR: connection isn NULL")); } } @@ -389,7 +391,7 @@ void process_send_lifecycle_request(DBusConnection* conn, int requestId, int sta if(!dbus_connection_send(conn, message, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_request => Access denied"), DLT_STRING(error.message) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_request => Access denied"), DLT_STRING(error.message) ); } dbus_connection_flush(conn); @@ -397,12 +399,12 @@ void process_send_lifecycle_request(DBusConnection* conn, int requestId, int sta } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_request => ERROR: Invalid message")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_request => ERROR: Invalid message")); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_request => ERROR: connection isn NULL")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("send_lifecycle_request => ERROR: connection isn NULL")); } } @@ -414,11 +416,13 @@ void msg_pending_func(DBusPendingCall *call, void *data) DBusError err; dbus_error_init(&err); + (void)data; + DBusMessage *message = dbus_pending_call_steal_reply(call); if (dbus_set_error_from_message(&err, message)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_pending_func ==> Access denied") ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_pending_func ==> Access denied") ); } else { diff --git a/src/persistence_client_library_dbus_service.c b/src/persistence_client_library_dbus_service.c index 608ae87..694cd6a 100644 --- a/src/persistence_client_library_dbus_service.c +++ b/src/persistence_client_library_dbus_service.c @@ -21,7 +21,7 @@ #include "persistence_client_library_lc_interface.h" #include "persistence_client_library_pas_interface.h" #include "persistence_client_library_dbus_cmd.h" -#include "../include_protected/persistence_client_library_data_organization.h" +#include "persistence_client_library_data_organization.h" #include @@ -88,13 +88,16 @@ int bContinue = 0; /* function to unregister ojbect path message handler */ static void unregisterMessageHandler(DBusConnection *connection, void *user_data) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("unregisterObjectPath\n")); + (void)connection; + (void)user_data; + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("unregisterObjectPath\n")); } /* catches messages not directed to any registered object path ("garbage collector") */ static DBusHandlerResult handleObjectPathMessageFallback(DBusConnection * connection, DBusMessage * message, void * user_data) { DBusHandlerResult result = DBUS_HANDLER_RESULT_HANDLED; + (void)user_data; // org.genivi.persistence.admin S I G N A L if((0==strcmp("org.genivi.persistence.admin", dbus_message_get_interface(message)))) @@ -108,7 +111,7 @@ static DBusHandlerResult handleObjectPathMessageFallback(DBusConnection * connec } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback -> unknown signal:"), DLT_STRING(dbus_message_get_interface(message)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback -> unknown signal:"), DLT_STRING(dbus_message_get_interface(message)) ); } } } @@ -155,12 +158,12 @@ static DBusHandlerResult handleObjectPathMessageFallback(DBusConnection * connec if (reply == 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback => DBus No memory"), DLT_STRING(dbus_message_get_interface(message)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback => DBus No memory"), DLT_STRING(dbus_message_get_interface(message)) ); } if (!dbus_connection_send(connection, reply, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback => DBus No memory"), DLT_STRING(dbus_message_get_interface(message)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback => DBus No memory"), DLT_STRING(dbus_message_get_interface(message)) ); } result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;; @@ -179,7 +182,7 @@ static DBusHandlerResult handleObjectPathMessageFallback(DBusConnection * connec } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback => gChangeNotifyCallback is not set (possibly NULL)") ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback => gChangeNotifyCallback is not set (possibly NULL)") ); } result = DBUS_HANDLER_RESULT_HANDLED; } @@ -215,12 +218,12 @@ static DBusHandlerResult handleObjectPathMessageFallback(DBusConnection * connec } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback -> unknown property:"), DLT_STRING(dbus_message_get_interface(message)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback -> unknown property:"), DLT_STRING(dbus_message_get_interface(message)) ); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback -> not a signal:"), DLT_STRING(dbus_message_get_member(message)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("handleObjectPathMessageFallback -> not a signal:"), DLT_STRING(dbus_message_get_member(message)) ); } } return result; @@ -230,7 +233,9 @@ static DBusHandlerResult handleObjectPathMessageFallback(DBusConnection * connec static void unregisterObjectPathFallback(DBusConnection *connection, void *user_data) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("unregisterObjectPathFallback\n")); + (void)connection; + (void)user_data; + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("unregisterObjectPathFallback\n")); } @@ -239,15 +244,15 @@ void* run_mainloop(void* dataPtr) { // persistence admin message static const struct DBusObjectPathVTable vtablePersAdmin - = {unregisterMessageHandler, checkPersAdminMsg, NULL, }; + = {unregisterMessageHandler, checkPersAdminMsg, NULL, NULL, NULL, NULL}; // lifecycle message static const struct DBusObjectPathVTable vtableLifecycle - = {unregisterMessageHandler, checkLifecycleMsg, NULL, }; + = {unregisterMessageHandler, checkLifecycleMsg, NULL, NULL, NULL, NULL}; // fallback static const struct DBusObjectPathVTable vtableFallback - = {unregisterObjectPathFallback, handleObjectPathMessageFallback, NULL, }; + = {unregisterObjectPathFallback, handleObjectPathMessageFallback, NULL, NULL, NULL, NULL}; // setup the dbus mainLoop(vtablePersAdmin, vtableLifecycle, vtableFallback, dataPtr); @@ -273,7 +278,7 @@ int setup_dbus_mainloop(void) // Connect to the bus and check for errors if(pAddress != NULL) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("setup_dbus_mainloop -> Use specific dbus address:"), DLT_STRING(pAddress) ); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("setup_dbus_mainloop -> Use specific dbus address:"), DLT_STRING(pAddress) ); conn = dbus_connection_open_private(pAddress, &err); @@ -281,7 +286,7 @@ int setup_dbus_mainloop(void) { if(!dbus_bus_register(conn, &err)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("dbus_bus_register() Error :"), DLT_STRING(err.message) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("dbus_bus_register() Error :"), DLT_STRING(err.message) ); dbus_error_free (&err); pthread_mutex_unlock(&gDbusInitializedMtx); return -1; @@ -289,7 +294,7 @@ int setup_dbus_mainloop(void) } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("dbus_connection_open_private() Error :"), DLT_STRING(err.message) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("dbus_connection_open_private() Error :"), DLT_STRING(err.message) ); dbus_error_free(&err); pthread_mutex_unlock(&gDbusInitializedMtx); return -1; @@ -297,7 +302,7 @@ int setup_dbus_mainloop(void) } else { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("Use default dbus bus (DBUS_BUS_SYSTEM)")); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("Use default dbus bus (DBUS_BUS_SYSTEM)")); conn = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err); } @@ -306,7 +311,7 @@ int setup_dbus_mainloop(void) rval = pthread_create(&gMainLoopThread, NULL, run_mainloop, conn); if(rval) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pthread_create( DBUS run_mainloop ) returned an error:"), DLT_INT(rval) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pthread_create( DBUS run_mainloop ) returned an error:"), DLT_INT(rval) ); pthread_mutex_unlock(&gDbusInitializedMtx); return -1; } @@ -325,6 +330,7 @@ int setup_dbus_mainloop(void) static dbus_bool_t addWatch(DBusWatch *watch, void *data) { dbus_bool_t result = FALSE; + (void)data; if (ARRAY_SIZE(gPollInfo.fds)>gPollInfo.nfds) { @@ -362,7 +368,9 @@ static void removeWatch(DBusWatch *watch, void *data) { void* w_data = dbus_watch_get_data(watch); - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("removeWatch called "), DLT_INT( (int)watch) ); + (void)data; + + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("removeWatch called "), DLT_INT( (int)watch) ); if(w_data) free(w_data); @@ -374,7 +382,8 @@ static void removeWatch(DBusWatch *watch, void *data) static void watchToggled(DBusWatch *watch, void *data) { - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("watchToggled called "), DLT_INT( (int)watch) ); + (void)data; + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("watchToggled called "), DLT_INT( (int)watch) ); if(dbus_watch_get_enabled(watch)) addWatch(watch, data); @@ -386,6 +395,7 @@ static void watchToggled(DBusWatch *watch, void *data) static dbus_bool_t addTimeout(DBusTimeout *timeout, void *data) { + (void)data; dbus_bool_t ret = FALSE; if (ARRAY_SIZE(gPollInfo.fds)>gPollInfo.nfds) @@ -409,18 +419,18 @@ static dbus_bool_t addTimeout(DBusTimeout *timeout, void *data) } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("addTimeout => timerfd_settime() failed"), DLT_STRING(strerror(errno)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("addTimeout => timerfd_settime() failed"), DLT_STRING(strerror(errno)) ); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("addTimeout => timerfd_create() failed"), DLT_STRING(strerror(errno)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("addTimeout => timerfd_create() failed"), DLT_STRING(strerror(errno)) ); } } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("addTimeout => cannot create another fd to be poll()'ed")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("addTimeout => cannot create another fd to be poll()'ed")); } return ret; @@ -430,15 +440,16 @@ static dbus_bool_t addTimeout(DBusTimeout *timeout, void *data) static void removeTimeout(DBusTimeout *timeout, void *data) { - int i = gPollInfo.nfds; + (void)data; + while ((0 close() timerfd"), DLT_STRING(strerror(errno)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("removeTimeout => close() timerfd"), DLT_STRING(strerror(errno)) ); } --gPollInfo.nfds; @@ -460,15 +471,17 @@ static void removeTimeout(DBusTimeout *timeout, void *data) static void timeoutToggled(DBusTimeout *timeout, void *data) { int i = gPollInfo.nfds; + (void)data; + while ((0 timerfd_settime()"), DLT_STRING(strerror(errno)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("timeoutToggled => timerfd_settime()"), DLT_STRING(strerror(errno)) ); } } } @@ -487,7 +500,7 @@ int mainLoop(DBusObjectPathVTable vtable, DBusObjectPathVTable vtable2, if (dbus_error_is_set(&err)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => Connection Error:"), DLT_STRING(err.message) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => Connection Error:"), DLT_STRING(err.message) ); dbus_error_free(&err); } else if (NULL != conn) @@ -495,7 +508,7 @@ int mainLoop(DBusObjectPathVTable vtable, DBusObjectPathVTable vtable2, dbus_connection_set_exit_on_disconnect(conn, FALSE); if (-1 == (gEfds = eventfd(0, 0))) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => eventfd() failed w/ errno:"), DLT_INT(errno) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => eventfd() failed w/ errno:"), DLT_INT(errno) ); } else { @@ -518,7 +531,7 @@ int mainLoop(DBusObjectPathVTable vtable, DBusObjectPathVTable vtable2, if( (TRUE!=dbus_connection_set_watch_functions(conn, addWatch, removeWatch, watchToggled, NULL, NULL)) || (TRUE!=dbus_connection_set_timeout_functions(conn, addTimeout, removeTimeout, timeoutToggled, NULL, NULL)) ) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => dbus_connection_set_watch_functions() failed")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => dbus_connection_set_watch_functions() failed")); } else { @@ -534,7 +547,7 @@ int mainLoop(DBusObjectPathVTable vtable, DBusObjectPathVTable vtable2, if (0>ret) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => poll() failed w/ errno "), DLT_INT(errno) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => poll() failed w/ errno "), DLT_INT(errno) ); } else if (0==ret) { @@ -555,13 +568,13 @@ int mainLoop(DBusObjectPathVTable vtable, DBusObjectPathVTable vtable2, unsigned long long nExpCount = 0; if ((ssize_t)sizeof(nExpCount)!=read(gPollInfo.fds[i].fd, &nExpCount, sizeof(nExpCount))) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => read failed")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => read failed")); } - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => timeout")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => timeout")); if (FALSE==dbus_timeout_handle(gPollInfo.objects[i].timeout)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => dbus_timeout_handle() failed!?")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => dbus_timeout_handle() failed!?")); } bContinue = TRUE; } @@ -575,7 +588,7 @@ int mainLoop(DBusObjectPathVTable vtable, DBusObjectPathVTable vtable2, while ((-1==(ret = read(gPollInfo.fds[i].fd, buf, 64)))&&(EINTR == errno)); if(ret < 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => read() failed"), DLT_STRING(strerror(errno)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => read() failed"), DLT_STRING(strerror(errno)) ); } else { @@ -617,7 +630,7 @@ int mainLoop(DBusObjectPathVTable vtable, DBusObjectPathVTable vtable2, */ // ****************************************************** default: - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => command not handled"), DLT_INT(buf[0]) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("mainLoop => command not handled"), DLT_INT(buf[0]) ); break; } pthread_cond_signal(&gMainLoopCond); @@ -702,7 +715,7 @@ int deliverToMainloop_NM(tCmd mainloopCmd, unsigned int param1, unsigned int par if(-1 == write(gEfds, &cmd, (sizeof(uint64_t)))) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("deliverToMainloop => failed to write to pipe"), DLT_INT(errno)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("deliverToMainloop => failed to write to pipe"), DLT_INT(errno)); rval = -1; } diff --git a/src/persistence_client_library_file.c b/src/persistence_client_library_file.c index a331140..2bf14bf 100644 --- a/src/persistence_client_library_file.c +++ b/src/persistence_client_library_file.c @@ -19,14 +19,16 @@ #include "persistence_client_library_file.h" #include "persistence_client_library_backup_filelist.h" -#include "../include_protected/persistence_client_library_data_organization.h" -#include "../include_protected/persistence_client_library_db_access.h" -#include "../include_protected/crc32.h" - #include "persistence_client_library_pas_interface.h" #include "persistence_client_library_handle.h" #include "persistence_client_library_prct_access.h" +#include "persistence_client_library_data_organization.h" +#include "persistence_client_library_db_access.h" +#include "crc32.h" +#if USE_FILECACHE + #include +#endif #include // for open flags #include @@ -60,7 +62,12 @@ int pclFileClose(int fd) } __sync_fetch_and_sub(&gOpenFdArray[fd], FileClosed); // set closed flag +#if USE_FILECACHE + rval = pfcCloseFile(fd); +#else rval = close(fd); +#endif + } else { @@ -75,23 +82,26 @@ int pclFileClose(int fd) int pclFileGetSize(int fd) { - int rval = EPERS_NOT_INITIALIZED; + int size = EPERS_NOT_INITIALIZED; if(gPclInitialized >= PCLinitialized) { + +#if USE_FILECACHE + size = pfcFileGetSize(fd); +#else struct stat buf; - int ret = 0; - ret = fstat(fd, &buf); + size = fstat(fd, &buf); //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclFileGetSize fd: "), DLT_INT(fd)); - if(ret != -1) + if(size != -1) { - rval = buf.st_size; + size = buf.st_size; } +#endif } - - return rval; + return size; } @@ -100,6 +110,9 @@ void* pclFileMapData(void* addr, long size, long offset, int fd) { void* ptr = 0; +#if USE_FILECACHE + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("pclFileMapData not supported when using file cache")); +#else //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclFileMapData fd: "), DLT_INT(fd)); if(gPclInitialized >= PCLinitialized) @@ -114,6 +127,7 @@ void* pclFileMapData(void* addr, long size, long offset, int fd) ptr = EPERS_MAP_LOCKFS; } } +#endif return ptr; } @@ -131,7 +145,7 @@ int pclFileOpen(unsigned int ldbid, const char* resource_id, unsigned int user_n char dbKey[DbKeyMaxLen] = {0}; // database key char dbPath[DbPathMaxLen] = {0}; // database location - char backupPath[DbKeyMaxLen] = {0}; // backup file + char backupPath[DbPathMaxLen] = {0}; // backup file char csumPath[DbPathMaxLen] = {0}; // checksum file //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclFileOpen: "), DLT_INT(ldbid), DLT_STRING(resource_id) ); @@ -159,8 +173,8 @@ int pclFileOpen(unsigned int ldbid, const char* resource_id, unsigned int user_n } strncpy(fileSubPath, dbPath+length, DbPathMaxLen); - snprintf(backupPath, DbPathMaxLen, "%s%s", gBackupPrefix, fileSubPath); - snprintf(csumPath, DbPathMaxLen, "%s%s%s", gBackupPrefix, fileSubPath, ".crc"); + snprintf(backupPath, DbPathMaxLen-1, "%s%s", gBackupPrefix, fileSubPath); + snprintf(csumPath, DbPathMaxLen-1, "%s%s%s", gBackupPrefix, fileSubPath, ".crc"); if(shared_DB >= 0) // check valid database context { @@ -172,22 +186,35 @@ int pclFileOpen(unsigned int ldbid, const char* resource_id, unsigned int user_n { if((handle = pclVerifyConsistency(dbPath, backupPath, csumPath, flags)) == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileOpen: error => file inconsistent, recovery N O T possible!")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileOpen: error => file inconsistent, recovery N O T possible!")); return -1; } } + else + { + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("pclFileOpen: No Backup => file is read only OR is in blacklist!")); + } + +#if USE_FILECACHE + + if(handle > 0) // when the file is open, close it and do a new open unde PFC control + { + close(handle); + } - // open file + handle = pfcOpenFile(dbPath); +#else if(handle <= 0) // check if open is needed or already done in verifyConsistency { handle = open(dbPath, flags); } +#endif if(handle == -1 && errno == ENOENT) // file does not exist, create file and folder { if( (handle = pclCreateFile(dbPath)) == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileOpen: error => failed to create file: "), DLT_STRING(dbPath)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileOpen: error => failed to create file: "), DLT_STRING(dbPath)); } } @@ -236,6 +263,7 @@ int pclFileOpen(unsigned int ldbid, const char* resource_id, unsigned int user_n handle = EPERS_RESOURCE_NO_FILE; } } + return handle; } @@ -248,7 +276,11 @@ int pclFileReadData(int fd, void * buffer, int buffer_size) //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclFileReadData fd: "), DLT_INT(fd)); if(gPclInitialized >= PCLinitialized) { +#if USE_FILECACHE + readSize = pfcReadFile(fd, buffer, buffer_size); +#else readSize = read(fd, buffer, buffer_size); +#endif } return readSize; } @@ -284,13 +316,13 @@ int pclFileRemove(unsigned int ldbid, const char* resource_id, unsigned int user rval = remove(dbPath); if(rval == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileRemove => remove ERROR"), DLT_STRING(strerror(errno)) ); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileRemove => remove ERROR"), DLT_STRING(strerror(errno)) ); } } else { rval = shared_DB; - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileRemove ==> no valid database context or resource not a file")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileRemove ==> no valid database context or resource not a file")); } } else @@ -314,7 +346,11 @@ int pclFileSeek(int fd, long int offset, int whence) { if(AccessNoLock != isAccessLocked() ) // check if access to persistent data is locked { +#if USE_FILECACHE + rval = pfcFileSeek(fd, offset, whence); +#else rval = lseek(fd, offset, whence); +#endif } else { @@ -377,7 +413,11 @@ int pclFileWriteData(int fd, const void * buffer, int buffer_size) gFileHandleArray[fd].backupCreated = 1; } +#if USE_FILECACHE + size = pfcWriteFile(fd, buffer, buffer_size); +#else size = write(fd, buffer, buffer_size); +#endif } else { @@ -406,7 +446,7 @@ int pclFileCreatePath(unsigned int ldbid, const char* resource_id, unsigned int char dbKey[DbKeyMaxLen] = {0}; // database key char dbPath[DbPathMaxLen] = {0}; // database location - char backupPath[DbKeyMaxLen] = {0}; // backup file + char backupPath[DbPathMaxLen] = {0}; // backup file char csumPath[DbPathMaxLen] = {0}; // checksum file //DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("pclFileOpen: "), DLT_INT(ldbid), DLT_STRING(resource_id) ); @@ -428,12 +468,12 @@ int pclFileCreatePath(unsigned int ldbid, const char* resource_id, unsigned int if( dbContext.configKey.permission != PersistencePermission_ReadOnly && pclBackupNeeded(dbPath) ) { - snprintf(backupPath, DbPathMaxLen, "%s%s", dbPath, "~"); - snprintf(csumPath, DbPathMaxLen, "%s%s", dbPath, "~.crc"); + snprintf(backupPath, DbPathMaxLen-1, "%s%s", dbPath, "~"); + snprintf(csumPath, DbPathMaxLen-1, "%s%s", dbPath, "~.crc"); if((handle = pclVerifyConsistency(dbPath, backupPath, csumPath, flags)) == -1) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileOpen: error => file inconsistent, recovery N O T possible!")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclFileOpen: error => file inconsistent, recovery N O T possible!")); return -1; } // we don't need the file handle here diff --git a/src/persistence_client_library_handle.c b/src/persistence_client_library_handle.c index 7be6e3b..b1c9f6b 100644 --- a/src/persistence_client_library_handle.c +++ b/src/persistence_client_library_handle.c @@ -22,6 +22,7 @@ #include #include +#include /// handle index static int gHandleIdx = 1; @@ -69,7 +70,7 @@ int get_persistence_handle_idx() else { handle = EPERS_MAXHANDLE; - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("get_persistence_handle_idx => Reached maximum of open handles: "), DLT_INT(MaxPersHandle)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("get_persistence_handle_idx => Reached maximum of open handles: "), DLT_INT(MaxPersHandle)); } } pthread_mutex_unlock(&gMtx); @@ -99,9 +100,10 @@ void close_all_persistence_handle() if(pthread_mutex_lock(&gMtx) == 0) { // "free" all handles - memset(gFreeHandleArray, 0, MaxPersHandle); - memset(gOpenFdArray, 0, MaxPersHandle); - memset(gOpenFdArray, 0, MaxPersHandle); + memset(gFreeHandleArray, 0, sizeof(gFreeHandleArray)); + memset(gOpenHandleArray, 0, sizeof(gOpenHandleArray)); + memset(gOpenFdArray, 0, sizeof(gOpenFdArray)); + // reset variables gHandleIdx = 1; diff --git a/src/persistence_client_library_handle.h b/src/persistence_client_library_handle.h index 2a1c200..369884b 100644 --- a/src/persistence_client_library_handle.h +++ b/src/persistence_client_library_handle.h @@ -20,9 +20,9 @@ * @see */ -#include "../include_protected/persistence_client_library_data_organization.h" -#include "../include_protected/persistence_client_library_rc_table.h" +#include "persistence_client_library_data_organization.h" +#include /// key handle structure definition typedef struct _PersistenceKeyHandle_s @@ -31,8 +31,7 @@ typedef struct _PersistenceKeyHandle_s char dbPath[DbPathMaxLen]; /// path to the database char dbKey[DbKeyMaxLen]; /// database key char resourceID[DbResIDMaxLen]; /// resourceID -} -PersistenceKeyHandle_s; +} PersistenceKeyHandle_s; /// file handle structure definition @@ -43,8 +42,9 @@ typedef struct _PersistenceFileHandle_s char backupPath[DbPathMaxLen]; /// path to the backup file char csumPath[DbPathMaxLen]; /// path to the checksum file char* filePath; /// the path -} -PersistenceFileHandle_s; +} PersistenceFileHandle_s; + + /// persistence key handle array @@ -80,13 +80,10 @@ int get_persistence_handle_idx(); void set_persistence_handle_close_idx(int handle); - -/** - * @brief close open file handles - * - */ void close_all_persistence_handle(); + + #endif /* PERSISTENCY_CLIENT_LIBRARY_HANDLE_H */ diff --git a/src/persistence_client_library_itzam_errors.c b/src/persistence_client_library_itzam_errors.c deleted file mode 100644 index 843f675..0000000 --- a/src/persistence_client_library_itzam_errors.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - Itzam/C (version 6.0) is an embedded database engine written in Standard C. - - Copyright 2011 Scott Robert Ladd. All rights reserved. - - Older versions of Itzam/C are: - Copyright 2002, 2004, 2006, 2008 Scott Robert Ladd. All rights reserved. - - Ancestral code, from Java and C++ books by the author, is: - Copyright 1992, 1994, 1996, 2001 Scott Robert Ladd. All rights reserved. - - Itzam/C is user-supported open source software. It's continued development is dependent on - financial support from the community. You can provide funding by visiting the Itzam/C - website at: - - http://www.coyotegulch.com - - You may license Itzam/C in one of two fashions: - - 1) Simplified BSD License (FreeBSD License) - - Redistribution and use in source and binary forms, with or without modification, are - permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list - of conditions and the following disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY SCOTT ROBERT LADD ``AS IS'' AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SCOTT ROBERT LADD OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those of the - authors and should not be interpreted as representing official policies, either expressed - or implied, of Scott Robert Ladd. - - 2) Closed-Source Proprietary License - - If your project is a closed-source or proprietary project, the Simplified BSD License may - not be appropriate or desirable. In such cases, contact the Itzam copyright holder to - arrange your purchase of an appropriate license. - - The author can be contacted at: - - scott.ladd@coyotegulch.com - scott.ladd@gmail.com - http:www.coyotegulch.com -*/ - -/****************************************************************************** - * Project Persistency - * (c) copyright 2012 - * Company XS Embedded GmbH - *****************************************************************************/ -/****************************************************************************** -Small changes to use in persistence -******************************************************************************/ - /** - * @file persistence_client_itzam_errors.c - * @ingroup Persistence client library - * @author Ingo Huerner - * @brief Itzam database error definnitions - * @see - */ - -#include "persistence_client_library_itzam_errors.h" -#include "../include_protected/persistence_client_library_data_organization.h" - - -const char * ERROR_STRINGS [] = -{ - "invalid datafile signature", - "invalid version", - "can not open 64-bit datafile on 32-bit operating system", - "write failed", - "open failed", - "read failed", - "close failed", - "seek failed", - "tell failed", - "duplicate remove", - "flush failed", - "rewrite record too small", - "page not found", - "lost key", - "key not written", - "key seek failed", - "unable to remove key record", - "record seek failed", - "unable to remove data record", - "list of deleted records could not be read", - "list of deleted records could not be written", - "iterator record count differs from database internal count", - "rewrite over deleted record", - "invalid column index", - "invalid row index", - "invalid hash value", - "memory allocation failed", - "attempt reading deleted record", - "invalid record signature found", - "invalid file locking mode", - "unable to lock datafile", - "unable to unlock datafile", - "size mismatch when reading record", - "attempt to start new transaction while one is already active", - "no transaction active", - "attempt to free a B-tree cursor when cursors were active", - "invalid datafile object", - "size_t is incompatible with Itzam", - "could not create datafile", - "global shared memory requires Administrator or user with SeCreateGlobalPrivilege", - "cannot create global shared memory", - "another process or thread has already created shared objects for this datafile", - "invalid operation for read only file" -}; - -const char * STATE_MESSAGES [] = -{ - "okay", - "operation failed", - "version mismatch in files", - "iterator at end", - "iterator at beginning", - "key not found", - "duplicate key", - "exceeded maximum file size on 32-bit system", - "unable to write data record for index", - "sizeof(size_t) smaller than required for file references; possibly 64-bit DB on 32-bit platform", - "invalid operation for read only file" -}; - - -void error_handler(const char * function_name, itzam_error error) -{ - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("Itzam error in: "), DLT_STRING(function_name), DLT_STRING(ERROR_STRINGS[error])); -} diff --git a/src/persistence_client_library_itzam_errors.h b/src/persistence_client_library_itzam_errors.h deleted file mode 100644 index 7324ea6..0000000 --- a/src/persistence_client_library_itzam_errors.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef PERSISTENCE_CLIENT_ITZAM_ERRORS_H -#define PERSISTENCE_CLIENT_ITZAM_ERRORS_H - -/* - Itzam/C (version 6.0) is an embedded database engine written in Standard C. - - Copyright 2011 Scott Robert Ladd. All rights reserved. - - Older versions of Itzam/C are: - Copyright 2002, 2004, 2006, 2008 Scott Robert Ladd. All rights reserved. - - Ancestral code, from Java and C++ books by the author, is: - Copyright 1992, 1994, 1996, 2001 Scott Robert Ladd. All rights reserved. - - Itzam/C is user-supported open source software. It's continued development is dependent on - financial support from the community. You can provide funding by visiting the Itzam/C - website at: - - http://www.coyotegulch.com - - You may license Itzam/C in one of two fashions: - - 1) Simplified BSD License (FreeBSD License) - - Redistribution and use in source and binary forms, with or without modification, are - permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list - of conditions and the following disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY SCOTT ROBERT LADD ``AS IS'' AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SCOTT ROBERT LADD OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - The views and conclusions contained in the software and documentation are those of the - authors and should not be interpreted as representing official policies, either expressed - or implied, of Scott Robert Ladd. - - 2) Closed-Source Proprietary License - - If your project is a closed-source or proprietary project, the Simplified BSD License may - not be appropriate or desirable. In such cases, contact the Itzam copyright holder to - arrange your purchase of an appropriate license. - - The author can be contacted at: - - scott.ladd@coyotegulch.com - scott.ladd@gmail.com - http:www.coyotegulch.com -*/ - -/****************************************************************************** - * Project Persistency - * (c) copyright 2012 - * Company XS Embedded GmbH - *****************************************************************************/ -/****************************************************************************** -Small changes to use in persistence -******************************************************************************/ - /** - * @file persistence_client_itzam_errors.h - * @ingroup Persistence client library - * @author Ingo Huerner - * @brief Itzam database error definnitions - * @see - */ - -#include - -/// error string messages definition -extern const char * ERROR_STRINGS []; - -/// error state messages definition -extern const char * STATE_MESSAGES []; - -/// error handler -void error_handler(const char * function_name, itzam_error error); - - -#endif /* PERSISTENCE_CLIENT_ITZAM_ERRORS_H */ diff --git a/src/persistence_client_library_key.c b/src/persistence_client_library_key.c index 015f9e2..0d7c0ee 100644 --- a/src/persistence_client_library_key.c +++ b/src/persistence_client_library_key.c @@ -18,15 +18,15 @@ */ #include "persistence_client_library_key.h" - -#include "../include_protected/persistence_client_library_db_access.h" -#include "../include_protected/persistence_client_library_rc_table.h" -#include "../include_protected/crc32.h" - #include "persistence_client_library_handle.h" #include "persistence_client_library_pas_interface.h" -#include "persistence_client_library_prct_access.h" #include "persistence_client_library_custom_loader.h" +#include "persistence_client_library_prct_access.h" +#include "persistence_client_library_db_access.h" +#include "crc32.h" + +#include + // function declaration @@ -90,18 +90,18 @@ int pclKeyHandleOpen(unsigned int ldbid, const char* resource_id, unsigned int u strncpy(gKeyHandleArray[handle].dbKey, dbKey, DbKeyMaxLen); strncpy(gKeyHandleArray[handle].resourceID, resource_id, DbResIDMaxLen); gKeyHandleArray[handle].dbPath[DbPathMaxLen-1] = '\0'; // Ensures 0-Termination - gKeyHandleArray[handle].dbKey[ DbPathMaxLen-1] = '\0'; // Ensures 0-Termination + gKeyHandleArray[handle].dbKey[ DbKeyMaxLen-1] = '\0'; // Ensures 0-Termination gKeyHandleArray[handle].info = dbContext; } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyHandleOpen: error - handleId out of bounds:"), DLT_INT(handle)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyHandleOpen: error - handleId out of bounds:"), DLT_INT(handle)); } } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyHandleOpen: error - no database context or resource is not a key ")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyHandleOpen: error - no database context or resource is not a key ")); } } @@ -184,7 +184,7 @@ int pclKeyHandleGetSize(int key_handle) } else { - size = pers_db_get_key_size(gKeyHandleArray[key_handle].dbPath, gKeyHandleArray[key_handle].dbKey, + size = persistence_get_data_size(gKeyHandleArray[key_handle].dbPath, gKeyHandleArray[key_handle].dbKey, &gKeyHandleArray[key_handle].info); } } @@ -225,7 +225,7 @@ int pclKeyHandleReadData(int key_handle, unsigned char* buffer, int buffer_size) } else { - size = pers_db_read_key(gKeyHandleArray[key_handle].dbPath, gKeyHandleArray[key_handle].dbKey, + size = persistence_get_data(gKeyHandleArray[key_handle].dbPath, gKeyHandleArray[key_handle].dbKey, &gKeyHandleArray[key_handle].info, buffer, buffer_size); } } @@ -315,7 +315,7 @@ int pclKeyHandleWriteData(int key_handle, unsigned char* buffer, int buffer_size if(rval <= 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyHandleWriteData: error - failed to send notification")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyHandleWriteData: error - failed to send notification")); size = rval; } } @@ -327,7 +327,7 @@ int pclKeyHandleWriteData(int key_handle, unsigned char* buffer, int buffer_size } else { - size = pers_db_write_key(gKeyHandleArray[key_handle].dbPath, gKeyHandleArray[key_handle].dbKey, + size = persistence_set_data(gKeyHandleArray[key_handle].dbPath, gKeyHandleArray[key_handle].dbKey, &gKeyHandleArray[key_handle].info, buffer, buffer_size); } } @@ -344,7 +344,7 @@ int pclKeyHandleWriteData(int key_handle, unsigned char* buffer, int buffer_size } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyHandleWriteData: error - buffer_size to big, limit is [bytes]:"), DLT_INT(gMaxKeyValDataSize)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyHandleWriteData: error - buffer_size to big, limit is [bytes]:"), DLT_INT(gMaxKeyValDataSize)); size = EPERS_MAX_BUFF_SIZE; } } @@ -394,7 +394,7 @@ int pclKeyDelete(unsigned int ldbid, const char* resource_id, unsigned int user_ if( dbContext.configKey.storage < PersistenceStorage_LastEntry && dbContext.configKey.storage >= PersistenceStorage_local) // check if store policy is valid { - rval = pers_db_delete_key(dbPath, dbKey, &dbContext); + rval = persistence_delete_data(dbPath, dbKey, &dbContext); } else { @@ -439,7 +439,7 @@ int pclKeyGetSize(unsigned int ldbid, const char* resource_id, unsigned int user if( dbContext.configKey.storage < PersistenceStorage_LastEntry && dbContext.configKey.storage >= PersistenceStorage_local) // check if store policy is valid { - data_size = pers_db_get_key_size(dbPath, dbKey, &dbContext); + data_size = persistence_get_data_size(dbPath, dbKey, &dbContext); } else { @@ -487,7 +487,7 @@ int pclKeyReadData(unsigned int ldbid, const char* resource_id, unsigned int use if( dbContext.configKey.storage < PersistenceStorage_LastEntry && dbContext.configKey.storage >= PersistenceStorage_local) // check if store policy is valid { - data_size = pers_db_read_key(dbPath, dbKey, &dbContext, buffer, buffer_size); + data_size = persistence_get_data(dbPath, dbKey, &dbContext, buffer, buffer_size); } else { @@ -496,7 +496,7 @@ int pclKeyReadData(unsigned int ldbid, const char* resource_id, unsigned int use } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyReadData - error - no database context or resource is not a key")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyReadData - error - no database context or resource is not a key")); } } else @@ -548,7 +548,7 @@ int pclKeyWriteData(unsigned int ldbid, const char* resource_id, unsigned int us if( dbContext.configKey.storage < PersistenceStorage_LastEntry && dbContext.configKey.storage >= PersistenceStorage_local) // check if store policy is valid { - data_size = pers_db_write_key(dbPath, dbKey, &dbContext, buffer, buffer_size); + data_size = persistence_set_data(dbPath, dbKey, &dbContext, buffer, buffer_size); } else { @@ -562,13 +562,13 @@ int pclKeyWriteData(unsigned int ldbid, const char* resource_id, unsigned int us } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyWriteData - error - no database context or resource is not a key")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyWriteData - error - no database context or resource is not a key")); } } else { data_size = EPERS_BUFLIMIT; - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyWriteData: error - buffer_size to big, limit is [bytes]:"), DLT_INT(gMaxKeyValDataSize)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyWriteData: error - buffer_size to big, limit is [bytes]:"), DLT_INT(gMaxKeyValDataSize)); } } else @@ -576,7 +576,6 @@ int pclKeyWriteData(unsigned int ldbid, const char* resource_id, unsigned int us data_size = EPERS_LOCKFS; } } - return data_size; } @@ -631,7 +630,7 @@ int regNotifyOnChange(unsigned int ldbid, const char* resource_id, unsigned int } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyRegisterNotifyOnChange: error - resource is not a shared resource or resource is not a key")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("pclKeyRegisterNotifyOnChange: error - resource is not a shared resource or resource is not a key")); rval = EPERS_NOTIFY_NOT_ALLOWED; } } diff --git a/src/persistence_client_library_lc_interface.c b/src/persistence_client_library_lc_interface.c index 83deac6..fedccf1 100644 --- a/src/persistence_client_library_lc_interface.c +++ b/src/persistence_client_library_lc_interface.c @@ -19,15 +19,15 @@ #include "persistence_client_library_lc_interface.h" -#include "../include_protected/persistence_client_library_data_organization.h" -#include "../include_protected/persistence_client_library_db_access.h" +#include "persistence_client_library_data_organization.h" +#include "persistence_client_library_db_access.h" #include "persistence_client_library_handle.h" #include "persistence_client_library_pas_interface.h" #include "persistence_client_library_dbus_service.h" #include "persistence_client_library_custom_loader.h" #include "persistence_client_library_prct_access.h" -#include "persistence_client_library_itzam_errors.h" + #include #include @@ -46,7 +46,7 @@ int check_lc_request(int request, int requestID) { if(-1 == deliverToMainloop_NM(CMD_LC_PREPARE_SHUTDOWN, request, requestID) ) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("check_lc_request => failed to write to pipe"), DLT_INT(errno)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("check_lc_request => failed to write to pipe"), DLT_INT(errno)); rval = NsmErrorStatus_Fail; } else @@ -57,7 +57,7 @@ int check_lc_request(int request, int requestID) } default: { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("check_lc_request => Unknown lifecycle message"), DLT_INT(request)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("check_lc_request => Unknown lifecycle message"), DLT_INT(request)); break; } } @@ -84,12 +84,12 @@ int msg_lifecycleRequest(DBusConnection *connection, DBusMessage *message) if (reply == 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); } if (!dbus_connection_send(connection, reply, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); } dbus_message_unref(reply); @@ -103,17 +103,17 @@ int msg_lifecycleRequest(DBusConnection *connection, DBusMessage *message) if (reply == 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); } if (!dbus_message_append_args(reply, DBUS_TYPE_INT32, &msgReturn, DBUS_TYPE_INVALID)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); } if (!dbus_connection_send(connection, reply, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_lifecycleRequest => DBus No memory")); } dbus_connection_flush(connection); @@ -128,6 +128,8 @@ DBusHandlerResult checkLifecycleMsg(DBusConnection * connection, DBusMessage * m { DBusHandlerResult result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + (void)user_data; + if((0==strncmp("org.genivi.NodeStateManager.LifeCycleConsumer", dbus_message_get_interface(message), 46))) { if((0==strncmp("LifecycleRequest", dbus_message_get_member(message), 16))) @@ -136,7 +138,7 @@ DBusHandlerResult checkLifecycleMsg(DBusConnection * connection, DBusMessage * m } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("checkLifecycleMsg -> unknown message "), DLT_STRING(dbus_message_get_interface(message))); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("checkLifecycleMsg -> unknown message "), DLT_STRING(dbus_message_get_interface(message))); } } return result; @@ -156,9 +158,3 @@ int unregister_lifecycle(int shutdownMode) return deliverToMainloop(CMD_SEND_LC_REGISTER, 0, shutdownMode); } -/* -int send_prepare_shutdown_complete(int requestId, int status) -{ - return deliverToMainloop_NM(CMD_SEND_LC_REQUEST, status, requestId); -} -*/ diff --git a/src/persistence_client_library_pas_interface.c b/src/persistence_client_library_pas_interface.c index 1ca9a2b..3e60228 100644 --- a/src/persistence_client_library_pas_interface.c +++ b/src/persistence_client_library_pas_interface.c @@ -20,10 +20,11 @@ #include "persistence_client_library_pas_interface.h" #include "persistence_client_library_dbus_service.h" -#include "../include_protected/persistence_client_library_data_organization.h" +#include "persistence_client_library_data_organization.h" #include #include +#include /// flag if access is locked static int gLockAccess = 0; @@ -31,6 +32,7 @@ static int gLockAccess = 0; int pers_data_sync(void) { + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("PCL: pers_data_sync()")); sync(); return 1; } @@ -58,9 +60,10 @@ int check_pas_request(unsigned int request, unsigned int requestID) { case (PasMsg_Block|PasMsg_WriteBack): { + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("PCL: check_pas_request; case PasMsg_Block o. PasMsg_WriteBack")); if(-1 == deliverToMainloop_NM(CMD_PAS_BLOCK_AND_WRITE_BACK, request, requestID)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("write failed w/ errno "), DLT_INT(errno), DLT_STRING(strerror(errno))); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("write failed w/ errno "), DLT_INT(errno), DLT_STRING(strerror(errno))); rval = PasErrorStatus_FAIL; } else @@ -71,6 +74,7 @@ int check_pas_request(unsigned int request, unsigned int requestID) } case PasMsg_Unblock: { + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("PCL: check_pas_request; case PasMsg_Unblock")); pers_unlock_access(); rval = PasErrorStatus_OK; break; @@ -106,12 +110,12 @@ DBusHandlerResult msg_persAdminRequest(DBusConnection *connection, DBusMessage * if(reply == 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); } if (!dbus_connection_send(connection, reply, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); } dbus_message_unref(reply); @@ -125,17 +129,17 @@ DBusHandlerResult msg_persAdminRequest(DBusConnection *connection, DBusMessage * if (reply == 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); } if (!dbus_message_append_args(reply, DBUS_TYPE_INT32, &errorReturn, DBUS_TYPE_INVALID)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); } if (!dbus_connection_send(connection, reply, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("msg_persAdminRequest => DBus No memory")); } dbus_connection_flush(connection); @@ -161,12 +165,12 @@ int signal_persModeChange(DBusConnection *connection, DBusMessage *message) if(reply == 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); } if (!dbus_connection_send(connection, reply, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); } dbus_message_unref(reply); @@ -178,17 +182,17 @@ int signal_persModeChange(DBusConnection *connection, DBusMessage *message) if (reply == 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); } if (!dbus_message_append_args(reply, DBUS_TYPE_INT32, &errorCode, DBUS_TYPE_INVALID)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); } if (!dbus_connection_send(connection, reply, 0)) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("signal_persModeChange => DBus No memory")); } dbus_connection_flush(connection); @@ -202,6 +206,8 @@ DBusHandlerResult checkPersAdminMsg(DBusConnection * connection, DBusMessage * m { DBusHandlerResult result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + (void)user_data; + if((0==strcmp("org.genivi.persistence.adminconsumer", dbus_message_get_interface(message)))) { if((0==strcmp("PersistenceAdminRequest", dbus_message_get_member(message)))) @@ -210,12 +216,12 @@ DBusHandlerResult checkPersAdminMsg(DBusConnection * connection, DBusMessage * m } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("checkPersAdminMsg => unknown message"), DLT_STRING(dbus_message_get_member(message))); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("checkPersAdminMsg => unknown message"), DLT_STRING(dbus_message_get_member(message))); } } else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("checkPersAdminMsg => unknown message"), DLT_STRING(dbus_message_get_interface(message))); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("checkPersAdminMsg => unknown message"), DLT_STRING(dbus_message_get_interface(message))); } return result; } @@ -229,7 +235,7 @@ int register_pers_admin_service(void) if(-1 == deliverToMainloop(CMD_SEND_PAS_REGISTER, 1, (PasMsg_Block | PasMsg_WriteBack | PasMsg_Unblock))) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("register_pers_admin_service => failed to write to pipe"), DLT_INT(errno)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("register_pers_admin_service => failed to write to pipe"), DLT_INT(errno)); rval = -1; } else @@ -248,7 +254,7 @@ int unregister_pers_admin_service(void) if(-1 == deliverToMainloop(CMD_SEND_PAS_REGISTER, 0, (PasMsg_Block | PasMsg_WriteBack | PasMsg_Unblock))) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("unregister_pers_admin_service => failed to write to pipe"), DLT_INT(errno)); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("unregister_pers_admin_service => failed to write to pipe"), DLT_INT(errno)); rval = -1; } else @@ -259,3 +265,4 @@ int unregister_pers_admin_service(void) return rval; } + diff --git a/src/persistence_client_library_prct_access.c b/src/persistence_client_library_prct_access.c index d1158ca..5fffc3c 100644 --- a/src/persistence_client_library_prct_access.c +++ b/src/persistence_client_library_prct_access.c @@ -18,19 +18,36 @@ */ + #include "persistence_client_library_prct_access.h" -#include "persistence_client_library_itzam_errors.h" -#include "../include_protected/persistence_client_library_db_access.h" +#include "persistence_client_library_db_access.h" #include +#include +#include +#include +#include /// pointer to resource table database -itzam_btree gResource_table[PrctDbTableSize] = {{0}}; +int gResource_table[PrctDbTableSize] = {-1}; /// array to hold the information of database is already open int gResourceOpen[PrctDbTableSize] = {0}; +/// persistence resource config table type definition +typedef enum _PersistenceRCT_e +{ + PersistenceRCT_local = 0, + PersistenceRCT_shared_public = 1, + PersistenceRCT_shared_group = 2, + + PersistenceRCT_LastEntry // last Entry + +} PersistenceRCT_e; + + + PersistenceRCT_e get_table_id(int ldbid, int* groupId) { PersistenceRCT_e rctType = PersistenceRCT_LastEntry; @@ -55,32 +72,27 @@ PersistenceRCT_e get_table_id(int ldbid, int* groupId) { // L O C A L database *groupId = 0; // no group ID for local data - rctType = PersistenceStorage_local; // we have a local database + rctType = PersistenceRCT_local; // we have a local database } return rctType; } -itzam_btree* get_resource_cfg_table_by_idx(int i) +int get_resource_cfg_table_by_idx(int i) { - return &gResource_table[i]; + return gResource_table[i]; } -int get_resource_cfg_table_status(int i) -{ - return gResourceOpen[i]; -} void invalidate_resource_cfg_table(int i) { - gResourceOpen[i] = 0; + gResource_table[i] = -1; } // status: OK -itzam_btree* get_resource_cfg_table(PersistenceRCT_e rct, int group) +int get_resource_cfg_table(PersistenceRCT_e rct, int group) { int arrayIdx = 0; - itzam_btree* tree = NULL; // create array index: index is a combination of resource config table type and group arrayIdx = rct + group; @@ -89,7 +101,6 @@ itzam_btree* get_resource_cfg_table(PersistenceRCT_e rct, int group) { if(gResourceOpen[arrayIdx] == 0) // check if database is already open { - itzam_state state; char filename[DbPathMaxLen] = {0}; switch(rct) // create db name @@ -104,30 +115,24 @@ itzam_btree* get_resource_cfg_table(PersistenceRCT_e rct, int group) snprintf(filename, DbPathMaxLen, gSharedWtPathKey, gAppId, group, gResTableCfg); break; default: - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("get_resource_cfg_table - error: no valid PersistenceRCT_e")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("get_resource_cfg_table - error: no valid PersistenceRCT_e")); break; } - state = itzam_btree_open(&gResource_table[arrayIdx], filename, itzam_comparator_string, error_handler, 0 , 0); - if(state != ITZAM_OKAY) + + gResource_table[arrayIdx] = persComRctOpen(filename, 0x00) ; + if(gResource_table[arrayIdx] < 0) { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("get_resource_cfg_table => itzam_btree_open => Itzam problem"), DLT_STRING(STATE_MESSAGES[state]) ); - tree = NULL; + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("get_resource_cfg_table => RCT problem")); } else { - gResourceOpen[arrayIdx] = 1; // remember the index has an DB entry - tree = &gResource_table[arrayIdx]; + gResourceOpen[arrayIdx] = 1 ; } } - else - { - tree = &gResource_table[arrayIdx]; - } - } - return tree; + return gResource_table[arrayIdx]; } @@ -141,28 +146,20 @@ int get_db_context(PersistenceInfo_s* dbContext, const char* resource_id, unsign rct = get_table_id(dbContext->context.ldbid, &groupId); // get resource configuration table - itzam_btree* resource_table = get_resource_cfg_table(rct, groupId); + int handleRCT = get_resource_cfg_table(rct, groupId); - if(resource_table != NULL) + if(handleRCT >= 0) { - PersistenceRctEntry_s search; + PersistenceConfigurationKey_s sRctEntry ; + // check if resouce id is in write through table - if(itzam_true == itzam_btree_find(resource_table, resource_id, &search)) + int iErrCode = persComRctRead(handleRCT, resource_id, &sRctEntry) ; + + if(sizeof(PersistenceConfigurationKey_s) == iErrCode) { - memset(dbContext->configKey.reponsible, 0, MaxConfKeyLengthResp); - memset(dbContext->configKey.custom_name, 0, MaxConfKeyLengthCusName); - memset(dbContext->configKey.customID, 0, MaxRctLengthCustom_ID); - - dbContext->configKey.policy = search.data.policy; - dbContext->configKey.storage = search.data.storage; - dbContext->configKey.permission = search.data.permission; - dbContext->configKey.max_size = search.data.max_size; - dbContext->configKey.type = search.data.type; - memcpy(dbContext->configKey.reponsible, search.data.reponsible, MaxConfKeyLengthResp); - memcpy(dbContext->configKey.custom_name, search.data.custom_name, MaxConfKeyLengthCusName); - memcpy(dbContext->configKey.customID, search.data.customID, MaxRctLengthCustom_ID); - - if(dbContext->configKey.storage != PersistenceStorage_custom ) + //printf("get_db_context ==> data: %s\n", search.data); + memcpy(&dbContext->configKey, &sRctEntry, sizeof(dbContext->configKey)) ; + if(sRctEntry.storage != PersistenceStorage_custom ) { rval = get_db_path_and_key(dbContext, resource_id, dbKey, dbPath); } @@ -170,18 +167,21 @@ int get_db_context(PersistenceInfo_s* dbContext, const char* resource_id, unsign { // if customer storage, we use the custom name as dbPath strncpy(dbPath, dbContext->configKey.custom_name, strlen(dbContext->configKey.custom_name)); + + // and resource_id as dbKey + strncpy(dbKey, resource_id, strlen(resource_id)); } resourceFound = 1; } else { - DLT_LOG(gDLTContext, DLT_LOG_WARN, DLT_STRING("get_db_context => itzam_btree_open => resource_table: no value for key:"), DLT_STRING(resource_id) ); + DLT_LOG(gPclDLTContext, DLT_LOG_WARN, DLT_STRING("get_db_context => persComRctRead => resource_table: no value for key:"), DLT_STRING(resource_id) ); rval = EPERS_NOKEYDATA; } } // resource table else { - DLT_LOG(gDLTContext, DLT_LOG_ERROR, DLT_STRING("get_db_context =>error resource table")); + DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("get_db_context =>error resource table")); rval = EPERS_NOPRCTABLE; } @@ -207,7 +207,7 @@ int get_db_context(PersistenceInfo_s* dbContext, const char* resource_id, unsign memcpy(dbContext->configKey.reponsible, "default", strlen("default")); memcpy(dbContext->configKey.custom_name, "default", strlen("default")); - DLT_LOG(gDLTContext, DLT_LOG_INFO, DLT_STRING("get_db_context => create resource not in PRCT => key:"), DLT_STRING(resource_id) ); + DLT_LOG(gPclDLTContext, DLT_LOG_INFO, DLT_STRING("get_db_context => create resource not in PRCT => key:"), DLT_STRING(resource_id) ); // send create notification rval = pers_send_Notification_Signal(dbKey, &dbContext->context, pclNotifyStatus_created); @@ -292,7 +292,7 @@ int get_db_path_and_key(PersistenceInfo_s* dbContext, const char* resource_id, c if(PersistencePolicy_wc == dbContext->configKey.policy) { if(dbContext->configKey.type == PersistenceResourceType_key) - snprintf(dbPath, DbPathMaxLen, gSharedCachePath, gAppId, dbContext->context.ldbid); + snprintf(dbPath, DbPathMaxLen, gSharedCachePath, gAppId, dbContext->context.ldbid, ""); else snprintf(dbPath, DbPathMaxLen, gSharedCachePathKey, gAppId, dbContext->context.ldbid, dbKey); } @@ -313,14 +313,14 @@ int get_db_path_and_key(PersistenceInfo_s* dbContext, const char* resource_id, c if(PersistencePolicy_wc == dbContext->configKey.policy) { if(dbContext->configKey.type == PersistenceResourceType_key) - snprintf(dbPath, DbPathMaxLen, gSharedPublicCachePath, gAppId); + snprintf(dbPath, DbPathMaxLen, gSharedPublicCachePath, gAppId, ""); else snprintf(dbPath, DbPathMaxLen, gSharedPublicCachePathKey, gAppId, dbKey); } else if(PersistencePolicy_wt == dbContext->configKey.policy) { if(dbContext->configKey.type == PersistenceResourceType_key) - snprintf(dbPath, DbPathMaxLen, gSharedPublicWtPath, gAppId); + snprintf(dbPath, DbPathMaxLen, gSharedPublicWtPath, gAppId, ""); else snprintf(dbPath, DbPathMaxLen, gSharedPublicWtPathKey, gAppId, dbKey); } @@ -331,20 +331,19 @@ int get_db_path_and_key(PersistenceInfo_s* dbContext, const char* resource_id, c else { // L O C A L database - if(PersistencePolicy_wc == dbContext->configKey.policy) { if(dbContext->configKey.type == PersistenceResourceType_key) - snprintf(dbPath, DbPathMaxLen, gLocalCachePath, gAppId); + snprintf(dbPath, DbPathMaxLen, gLocalCachePath, gAppId, ""); else snprintf(dbPath, DbPathMaxLen, gLocalCachePathKey, gAppId, dbKey); } else if(PersistencePolicy_wt == dbContext->configKey.policy) { if(dbContext->configKey.type == PersistenceResourceType_key) - snprintf(dbPath, DbPathMaxLen, gLocalWtPath, gAppId); + snprintf(dbPath, DbPathMaxLen-1, gLocalWtPath, gAppId, ""); else - snprintf(dbPath, DbPathMaxLen, gLocalWtPathKey, gAppId, dbKey); + snprintf(dbPath, DbPathMaxLen-1, gLocalWtPathKey, gAppId, dbKey); } storePolicy = PersistenceStorage_local; // we have a local database @@ -352,6 +351,7 @@ int get_db_path_and_key(PersistenceInfo_s* dbContext, const char* resource_id, c //printf("get_db_path_and_key - dbKey : [key ]: %s \n", dbKey); //printf("get_db_path_and_key - dbPath : [path]: %s\n", dbPath); + return storePolicy; } diff --git a/src/persistence_client_library_prct_access.h b/src/persistence_client_library_prct_access.h index a14ebdc..0bba971 100644 --- a/src/persistence_client_library_prct_access.h +++ b/src/persistence_client_library_prct_access.h @@ -20,10 +20,8 @@ * @see */ -#include "../include_protected/persistence_client_library_data_organization.h" -#include "../include_protected/persistence_client_library_rc_table.h" +#include "persistence_client_library_data_organization.h" -#include /** * @brief Create database search key and database location path @@ -44,7 +42,7 @@ int get_db_path_and_key(PersistenceInfo_s* dbContext, const char* resource_id, c /** - * Create database search key and database location path + * @brief Create database search key and database location path * * @param dbContext the database context * @param resource_id the resource id @@ -62,24 +60,16 @@ int get_db_context(PersistenceInfo_s* dbContext, const char* resource_id, unsign /** - * @brief get the resource configuration table database by id - * - * @param i the index + * @brief get the resource configuration table gvbd database by id * - * @return pointer to the database table or NULL if no valid database has been found + * @return Handle to the gvdb database table or negative value if no valid database has been found */ -itzam_btree* get_resource_cfg_table_by_idx(int i); - - +int get_resource_cfg_table_by_idx(int i); /** - * @brief get the resource configuration table status - * - * @param i the index - * - * @return status of database, 1 is db is opened and 0 is closed + * Global array for the storage of pointers to resource table databases */ -inline int get_resource_cfg_table_status(int i); +extern int gResource_table[PrctDbTableSize]; @@ -88,7 +78,7 @@ inline int get_resource_cfg_table_status(int i); * * @param i the index */ -inline void invalidate_resource_cfg_table(int i); +void invalidate_resource_cfg_table(int i); diff --git a/test/Makefile.am b/test/Makefile.am index da7b652..6264d76 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -24,7 +24,7 @@ persistence_client_library_benchmark_LDADD = $(DEPS_LIBS) \ persistence_client_library_test_SOURCES = persistence_client_library_test.c persistence_client_library_test_LDADD = $(DEPS_LIBS) $(CHECK_LIBS) \ $(top_srcdir)/src/libpersistence_client_library.la - + persistence_admin_service_mockup_SOURCES = persistence_admin_service_mockup.c persistence_admin_service_mockup_LDADD = $(DEPS_LIBS) diff --git a/test/data/Data.tar.gz b/test/data/Data.tar.gz index 93e23cd7215eba866a289c5dd2743ae9ba9857a8..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SNeG~}<*AV8 zySqh5i^Z-KOPz+t+zXXJ=TDrNM2d{Uf4Dx`M1aI;NR zRG}a^wuf#?amR{?T^NVBJ+TOb8eD7RcOw-M`B2ItwAwmdE8!LxDm@`q$1Xm#sKHCl zk5Bc0v@}{#ls~Sch-&tify(CaD_w^w6Wk}L=@{5Z2IQs^WeQr&91E^%y~d|{8=u9B zD4+gG65p^53T+ij58f0)`yT9pa*|^ssy<(y66ono;wzFb3MFB%#wiT;4e=gY5?)sV z=|W8RQZbR)DOMlKf;OWFVnwHEXn|_s#eu2_uO*7f9n_3sN~7dFXOZYVk}7=Va4u5p zHzV=V8+k!&vAtke-xDr^LL~IfokJ@P>%}o;3;6YHGl local USER value (user 3, seat 2) */ ret = pclKeyReadData(0xFF, "status/open_document", 3, 2, buffer, READ_SIZE); + printf("Ist: %s\n", buffer); + printf("Soll: %s\n", "WT_ /var/opt/user_manual_climateControl.pdf"); + x_fail_unless(strncmp((char*)buffer, "WT_ /var/opt/user_manual_climateControl.pdf", strlen((char*)buffer)) == 0, "Buffer not correctly read"); memset(buffer, 0, READ_SIZE); @@ -310,9 +310,11 @@ START_TEST(test_SetData) * ==> local USER value (user 1, seat 2) * Resource ID: 69 */ - + printf("function: %s ==> line: %d\n", __FUNCTION__, __LINE__); ret = pclKeyWriteData(0xFF, "69", 1, 2, (unsigned char*)sysTimeBuffer, strlen(sysTimeBuffer)); + printf("function: %s ==> line: %d\n", __FUNCTION__, __LINE__); x_fail_unless(ret == strlen(sysTimeBuffer), "Wrong write size"); + printf("function: %s ==> line: %d\n", __FUNCTION__, __LINE__); #if 1 snprintf(write1, 128, "%s %s", "/70", sysTimeBuffer); /** @@ -376,6 +378,8 @@ START_TEST(test_SetData) memset(buffer, 0, READ_SIZE); ret = pclKeyReadData(0xFF, "69", 1, 2, buffer, READ_SIZE); + printf("Verify ist : %s \n", buffer); + printf("Verify soll : %s \n", sysTimeBuffer); x_fail_unless(strncmp((char*)buffer, sysTimeBuffer, strlen(sysTimeBuffer)) == 0, "Buffer not correctly read"); x_fail_unless(ret == strlen(sysTimeBuffer), "Wrong read size"); @@ -482,6 +486,7 @@ START_TEST(test_GetDataSize) * ==> shared user value accessible by A GROUP (user 2 and seat 1) */ size = pclKeyGetSize(0x84, "links/last_link", 2, 1); + printf("=>=>=>=> soll: %d | ist: %d\n", strlen("CACHE_ /last_exit/queens"), size); x_fail_unless(size == strlen("CACHE_ /last_exit/queens"), "Invalid size"); #endif pclDeinitLibrary(); @@ -595,37 +600,55 @@ START_TEST(test_DataFile) x_fail_unless(fd != -1, "Could not open file ==> /media/mediaDB.db"); size = pclFileGetSize(fd); + printf("%s => %d\n", __FUNCTION__, __LINE__); + printf("Soll: 68 | Ist: %d\n", size); + printf("%s => %d\n", __FUNCTION__, __LINE__); x_fail_unless(size == 68, "Wrong file size"); + printf("%s => %d\n", __FUNCTION__, __LINE__); + printf("%s => %d\n", __FUNCTION__, __LINE__); size = pclFileReadData(fd, buffer, READ_SIZE); + printf("%s => %d\n", __FUNCTION__, __LINE__); x_fail_unless(strncmp((char*)buffer, refBuffer, strlen(refBuffer)) == 0, "Buffer not correctly read => media/mediaDB.db"); + printf("%s => %d\n", __FUNCTION__, __LINE__); x_fail_unless(size == (strlen(refBuffer)+1), "Wrong size returned"); // strlen + 1 ==> inlcude cr/lf - + printf("%s => %d\n", __FUNCTION__, __LINE__); ret = pclFileClose(fd); + printf("%s => %d\n", __FUNCTION__, __LINE__); x_fail_unless(ret == 0, "Failed to close file"); + printf("%s => %d\n", __FUNCTION__, __LINE__); // open ------------------------------------------------------------ + printf("%s => %d\n", __FUNCTION__, __LINE__); fd = pclFileOpen(0xFF, "media/mediaDBWrite.db", 1, 1); + printf("%s => %d\n", __FUNCTION__, __LINE__); x_fail_unless(fd != -1, "Could not open file ==> /media/mediaDBWrite.db"); size = pclFileWriteData(fd, writeBuffer, strlen(writeBuffer)); x_fail_unless(size == strlen(writeBuffer), "Failed to write data"); - + printf("%s => %d\n", __FUNCTION__, __LINE__); ret = pclFileClose(fd); + printf("%s => %d\n", __FUNCTION__, __LINE__); x_fail_unless(ret == 0, "Failed to close file"); - + printf("* * %s => %d\n", __FUNCTION__, __LINE__); // remove ---------------------------------------------------------- + printf("* * %s => %d\n", __FUNCTION__, __LINE__); ret = pclFileRemove(0xFF, "media/mediaDBWrite.db", 1, 1); + printf("* * %s => %d\n", __FUNCTION__, __LINE__); x_fail_unless(ret == 0, "File can't be removed ==> /media/mediaDBWrite.db"); + printf("* * %s => %d\n", __FUNCTION__, __LINE__); fd = open("/Data/mnt-wt/lt-persistence_client_library_test/user/1/seat/1/media/mediaDBWrite.db",O_RDWR); + printf("* * %s => %d\n", __FUNCTION__, __LINE__); x_fail_unless(fd == -1, "Failed to remove file, file still exists"); + printf("* * %s => %d\n", __FUNCTION__, __LINE__); close(fd); - + printf("* * %s => %d\n", __FUNCTION__, __LINE__); // map file -------------------------------------------------------- + fd = pclFileOpen(0xFF, "media/mediaDB.db", 1, 1); size = pclFileGetSize(fd); @@ -864,6 +887,7 @@ END_TEST +#if 0 /** * Test for i n t e r n a l structures. * Test the cursor functions. @@ -936,6 +960,7 @@ START_TEST(test_Cursor) pclDeinitLibrary(); } END_TEST +#endif @@ -1231,9 +1256,6 @@ static Suite * persistencyClientLib_suite() TCase * tc_persDataFileRecovery = tcase_create("DataFileRecovery"); tcase_add_test(tc_persDataFileRecovery, test_DataFileRecovery); - TCase * tc_Cursor = tcase_create("Cursor"); - tcase_add_test(tc_Cursor, test_Cursor); - TCase * tc_Plugin = tcase_create("Plugin"); tcase_add_test(tc_Plugin, test_Plugin); @@ -1265,7 +1287,6 @@ static Suite * persistencyClientLib_suite() suite_add_tcase(s, tc_persDataHandleOpen); suite_add_tcase(s, tc_persDataFile); suite_add_tcase(s, tc_persDataFileRecovery); - suite_add_tcase(s, tc_Cursor); suite_add_tcase(s, tc_ReadDefault); suite_add_tcase(s, tc_ReadConfDefault); suite_add_tcase(s, tc_GetPath); @@ -1274,6 +1295,7 @@ static Suite * persistencyClientLib_suite() suite_add_tcase(s, tc_FileOpenCreate); //suite_add_tcase(s, tc_Plugin); // activate only if the plugins are available + return s; } @@ -1292,7 +1314,7 @@ int main(int argc, char *argv[]) gTheAppId[MaxAppNameLen-1] = '\0'; /// debug log and trace (DLT) setup - DLT_REGISTER_APP("test","tests the persistence client library"); + DLT_REGISTER_APP("PCLt","tests the persistence client library"); #if 1 Suite * s = persistencyClientLib_suite(); -- 2.7.4