diff options
author | Ingo Huerner <ingo.huerner@xse.de> | 2013-04-18 11:48:29 +0200 |
---|---|---|
committer | Ingo Huerner <ingo.huerner@xse.de> | 2013-04-18 11:48:29 +0200 |
commit | 20075d4a4ab86720f0c11dca55726847db61898f (patch) | |
tree | c68fbf9c96de5259193cd86e672908100751804b /src/persistence_client_library_key.c | |
parent | 515004b1f75c8e2be7101732110c5b50ce9920f6 (diff) | |
download | persistence-client-library-20075d4a4ab86720f0c11dca55726847db61898f.tar.gz |
Added reason to notification messages; started with backup file list implementation
Diffstat (limited to 'src/persistence_client_library_key.c')
-rw-r--r-- | src/persistence_client_library_key.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/persistence_client_library_key.c b/src/persistence_client_library_key.c index 1469d72..0256173 100644 --- a/src/persistence_client_library_key.c +++ b/src/persistence_client_library_key.c @@ -55,7 +55,7 @@ int pclKeyHandleOpen(unsigned int ldbid, const char* resource_id, unsigned int u if( (handle >= 0) && (dbContext.configKey.type == PersistenceResourceType_key) ) // check if type matches { - if(dbContext.configKey.storage < PersistenceStoragePolicy_LastEntry) // check if store policy is valid + if(dbContext.configKey.storage < PersistenceStorage_LastEntry) // check if store policy is valid { if(PersistenceStorage_custom == dbContext.configKey.storage) { @@ -211,7 +211,7 @@ int pclKeyHandleRegisterNotifyOnChange(int key_handle, pclChangeNotifyCallback_t if(key_handle < MaxPersHandle) { - pclKeyRegisterNotifyOnChange(gKeyHandleArray[key_handle].info.context.ldbid, + rval = pclKeyRegisterNotifyOnChange(gKeyHandleArray[key_handle].info.context.ldbid, gKeyHandleArray[key_handle].resourceID, gKeyHandleArray[key_handle].info.context.user_no, gKeyHandleArray[key_handle].info.context.seat_no, callback); @@ -302,7 +302,7 @@ int pclKeyDelete(unsigned int ldbid, const char* resource_id, unsigned int user_ if( (rval >= 0) && (dbContext.configKey.type == PersistenceResourceType_key) ) // check if type is matching { - if( dbContext.configKey.storage < PersistenceStoragePolicy_LastEntry + 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); @@ -344,7 +344,7 @@ int pclKeyGetSize(unsigned int ldbid, const char* resource_id, unsigned int user if( (data_size >= 0) && (dbContext.configKey.type == PersistenceResourceType_key) ) // check if type matches { - if( dbContext.configKey.storage < PersistenceStoragePolicy_LastEntry + 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); @@ -390,7 +390,7 @@ int pclKeyReadData(unsigned int ldbid, const char* resource_id, unsigned int use && (dbContext.configKey.type == PersistenceResourceType_key) ) { - if( dbContext.configKey.storage < PersistenceStoragePolicy_LastEntry + 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); @@ -447,7 +447,7 @@ int pclKeyWriteData(unsigned int ldbid, const char* resource_id, unsigned int us hash_val_data = crc32(hash_val_data, buffer, buffer_size); // store data - if( dbContext.configKey.storage < PersistenceStoragePolicy_LastEntry + 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); @@ -505,6 +505,7 @@ int pclKeyRegisterNotifyOnChange(unsigned int ldbid, const char* resource_id, un else { printf("pclKeyRegisterNotifyOnChange: error - resource is not a shared resource or resource is not a key\n"); + rval = EPERS_RES_NO_KEY; } return rval; |