summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Huerner <ingo.huerner@xse.de>2012-12-11 14:55:24 +0100
committerIngo Huerner <ingo.huerner@xse.de>2012-12-11 14:55:24 +0100
commit245194a2e74ae6622d24fca4ba2ef9e7049291bb (patch)
treec174ea4455ecd146e00db7207c5f6d7afd8286bf
parent4d6b105fec074644e8094cc4e7fbf94c19c5f260 (diff)
downloadpersistence-client-library-245194a2e74ae6622d24fca4ba2ef9e7049291bb.tar.gz
Corrected path for shared group and shared public
-rw-r--r--src/persistence_client_library.c12
-rw-r--r--src/persistence_client_library_access_helper.c20
-rw-r--r--test/data/Data.tar.gzbin89608 -> 92059 bytes
3 files changed, 17 insertions, 15 deletions
diff --git a/src/persistence_client_library.c b/src/persistence_client_library.c
index 4c1da76..1a8a1c3 100644
--- a/src/persistence_client_library.c
+++ b/src/persistence_client_library.c
@@ -39,7 +39,7 @@
-#define ENABLE_DBUS_INTERFACE 1
+#define ENABLE_DBUS_INTERFACE 0
extern char* __progname;
@@ -83,13 +83,15 @@ const char* gLocalCachePath = "/Data/mnt-c/%s%s";
/// path prefic for local write through database /Data/mnt_wt/<appId>/<database_name>
const char* gLocalWtPath = "/Data/mnt-wt/%s%s";
/// path prefic for shared cached database: /Data/mnt_c/Shared/Group/<group_no>/<database_name>
-const char* gSharedCachePath = "/Data/mnt-c/shared/group/%x%s";
+const char* gSharedCachePath = "/Data/mnt-c/%s/Shared_Group_%x%s";
/// path prefic for shared write through database: /Data/mnt_wt/Shared/Group/<group_no>/<database_name>
-const char* gSharedWtPath = "/Data/mnt-wt/shared/group/%x%s";
+const char* gSharedWtPath = "/Data/mnt-wt/%s/Shared_Group_%x%s";
+
/// path prefic for shared public cached database: /Data/mnt_c/Shared/Public//<database_name>
-const char* gSharedPublicCachePath = "/Data/mnt-c/shared/public%s";
+const char* gSharedPublicCachePath = "/Data/mnt-c/%s/Shared_Public%s";
+
/// path prefic for shared public write through database: /Data/mnt_wt/Shared/Public/<database_name>
-const char* gSharedPublicWtPath = "/Data/mnt-wt/shared/public%s";
+const char* gSharedPublicWtPath = "/Data/mnt-wt/%s/Shared_Public%s";
/// application id
diff --git a/src/persistence_client_library_access_helper.c b/src/persistence_client_library_access_helper.c
index b1cde74..54fd83c 100644
--- a/src/persistence_client_library_access_helper.c
+++ b/src/persistence_client_library_access_helper.c
@@ -95,10 +95,10 @@ itzam_btree* get_resource_cfg_table(PersistenceRCT_e rct, int group)
snprintf(filename, DbPathMaxLen, gLocalWtPath, gAppId, gResTableCfg);
break;
case PersistenceRCT_shared_public:
- snprintf(filename, DbPathMaxLen, gSharedPublicWtPath, gResTableCfg);
+ snprintf(filename, DbPathMaxLen, gSharedPublicWtPath, gAppId, gResTableCfg);
break;
case PersistenceRCT_shared_group:
- snprintf(filename, DbPathMaxLen, gSharedWtPath, group, gResTableCfg);
+ snprintf(filename, DbPathMaxLen, gSharedWtPath, gAppId, group, gResTableCfg);
break;
default:
printf("get_resource_cfg_table - error: no valid PersistenceRCT_e\n");
@@ -403,16 +403,16 @@ int get_db_path_and_key(PersistenceInfo_s* dbContext, char* resource_id, unsigne
if(PersistencePolicy_wc == dbContext->configKey.policy)
{
if(isFile == ResIsNoFile)
- snprintf(dbPath, DbPathMaxLen, gSharedCachePath, dbContext->context.ldbid, gSharedCached);
+ snprintf(dbPath, DbPathMaxLen, gSharedCachePath, gAppId, dbContext->context.ldbid, gSharedCached);
else
- snprintf(dbPath, DbPathMaxLen, gSharedCachePath, dbContext->context.ldbid, dbKey);
+ snprintf(dbPath, DbPathMaxLen, gSharedCachePath, gAppId, dbContext->context.ldbid, dbKey);
}
else if(PersistencePolicy_wt == dbContext->configKey.policy)
{
if(isFile == ResIsNoFile)
- snprintf(dbPath, DbPathMaxLen, gSharedWtPath, dbContext->context.ldbid, gSharedWt);
+ snprintf(dbPath, DbPathMaxLen, gSharedWtPath, gAppId, dbContext->context.ldbid, gSharedWt);
else
- snprintf(dbPath, DbPathMaxLen, gSharedWtPath, dbContext->context.ldbid, dbKey);
+ snprintf(dbPath, DbPathMaxLen, gSharedWtPath, gAppId, dbContext->context.ldbid, dbKey);
}
}
else
@@ -424,16 +424,16 @@ int get_db_path_and_key(PersistenceInfo_s* dbContext, char* resource_id, unsigne
if(PersistencePolicy_wc == dbContext->configKey.policy)
{
if(isFile == ResIsNoFile)
- snprintf(dbPath, DbPathMaxLen, gSharedPublicCachePath, gSharedCached);
+ snprintf(dbPath, DbPathMaxLen, gSharedPublicCachePath, gAppId, gSharedCached);
else
- snprintf(dbPath, DbPathMaxLen, gSharedPublicCachePath, dbKey);
+ snprintf(dbPath, DbPathMaxLen, gSharedPublicCachePath, gAppId, dbKey);
}
else if(PersistencePolicy_wt == dbContext->configKey.policy)
{
if(isFile == ResIsNoFile)
- snprintf(dbPath, DbPathMaxLen, gSharedPublicWtPath, gSharedWt);
+ snprintf(dbPath, DbPathMaxLen, gSharedPublicWtPath, gAppId, gSharedWt);
else
- snprintf(dbPath, DbPathMaxLen, gSharedPublicWtPath, dbKey);
+ snprintf(dbPath, DbPathMaxLen, gSharedPublicWtPath, gAppId, dbKey);
}
}
diff --git a/test/data/Data.tar.gz b/test/data/Data.tar.gz
index 26847e7..4046ef6 100644
--- a/test/data/Data.tar.gz
+++ b/test/data/Data.tar.gz
Binary files differ