}
// initialize keyHandle array
- memset(gKeyHandleArray, 0, sizeof(gKeyHandleArray));
+ memset(gKeyHandleArray, 0, MaxPersHandle * sizeof(PersistenceKeyHandle_s));
pers_unlock_access();
DbResIDMaxLen = PERS_DB_MAX_LENGTH_KEY_NAME, /// max database key length
DbPathMaxLen = PERS_ORG_MAX_LENGTH_PATH_FILENAME, /// max database path length
MaxAppNameLen = PERS_RCT_MAX_LENGTH_RESPONSIBLE, /// max application name
- MaxPersHandle = 256, /// max number of parallel open persistence handles
+ MaxPersHandle = 128, /// max number of parallel open persistence handles
MaxConfKeyLengthResp = 32, /// length of the config key responsible name
MaxConfKeyLengthCusName = 32, /// length of the config key custom name
{
if(gResource_table[i] != -1)
{
- if(persComRctClose(i) != 0)
+ if(persComRctClose(gResource_table[i]) != 0)
{
DLT_LOG(gPclDLTContext, DLT_LOG_ERROR, DLT_STRING("process_prepare_shutdown => failed to close db => index:"), DLT_INT(i));
}