summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Vijay <abhishek.v@samsung.com>2019-09-30 15:31:48 +0530
committerAbhishek Vijay <abhishek.v@samsung.com>2019-09-30 15:31:48 +0530
commit7e054bf6834cde6e5c9de895c8e2b0d7f1a094c5 (patch)
treeb14ba902e925df63e4c7526c26e5d5f908c96cfb
parentf9da9e0a90cc591dff638af886b539659d4e7da6 (diff)
downloadsync-manager-accepted/tizen_5.5_unified.tar.gz
sync-manager-accepted/tizen_5.5_unified.tar.bz2
sync-manager-accepted/tizen_5.5_unified.zip
Change-Id: I9c26c8092245453eda03b7e380eaeba000995b0a Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
-rw-r--r--src/sync-service/SyncManager_RepositoryEngine.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sync-service/SyncManager_RepositoryEngine.cpp b/src/sync-service/SyncManager_RepositoryEngine.cpp
index e2b16f0..7ed6243 100644
--- a/src/sync-service/SyncManager_RepositoryEngine.cpp
+++ b/src/sync-service/SyncManager_RepositoryEngine.cpp
@@ -1946,11 +1946,17 @@ RepositoryEngine::UpdateSyncJobToDB(const char *SvcAppId, int UserId, const char
char *update_query = NULL;
string SvcPkgId = SyncManager::GetInstance()->GetPkgIdByAppId(SvcAppId);
+ char *svc_pkg_id = new char[SvcPkgId.size() + 1];
+ copy(SvcPkgId.begin(), SvcPkgId.end(), svc_pkg_id);
+ svc_pkg_id[SvcPkgId.size() + 1] = '\0';
+
update_query = sqlite3_mprintf("UPDATE %Q SET AppStatus=%Q, SyncJobId=%Q, AccountId=%Q, Interval=%Q, "
"Expedit=%Q, NoRetry=%Q, UserDataKey=%Q, UserDataValue=%Q "
"WHERE SvcAppId=%Q AND PkgName=%Q AND UserId=%Q AND SyncType=%Q AND JobName=%Q",
SYNC_JOB_TABLE, AppStatus, jobId, accId, interval, expedit, noRetry, UserKey, UserValue,
- SvcAppId, SvcPkgId.c_str(), uid, SyncType, JobName);
+ SvcAppId, svc_pkg_id, uid, SyncType, JobName);
+
+ delete[] svc_pkg_id;
sqlite3_stmt *stmt = NULL;
int ret = SQLITE_OK;