summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDewal Agarwal <d1.agarwal@samsung.com>2020-12-04 11:11:40 +0530
committerDewal Agarwal <d1.agarwal@samsung.com>2020-12-11 04:20:36 +0000
commit81215d83963d813e3c4582e2ddb6eb71434d530b (patch)
tree78675f7887ea5bf17de74e714352b60c5bc2a86a
parent124eff0dbcba6df683cd8f53b5a9701a1b5ebbee (diff)
downloadsync-manager-accepted/tizen_6.0_unified.tar.gz
sync-manager-accepted/tizen_6.0_unified.tar.bz2
sync-manager-accepted/tizen_6.0_unified.zip
Change-Id: Idb864b66523855c511a4818d6040d797d12899a0 Signed-off-by: Dewal Agarwal <d1.agarwal@samsung.com> (cherry picked from commit 0e38c0a905826c81fdbbf08d842efcc212b025ae)
-rw-r--r--src/sync-service/SyncManager_RepositoryEngine.cpp4
-rw-r--r--src/sync-service/SyncManager_SyncWorker.cpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/sync-service/SyncManager_RepositoryEngine.cpp b/src/sync-service/SyncManager_RepositoryEngine.cpp
index 071105c..b6cb5bc 100644
--- a/src/sync-service/SyncManager_RepositoryEngine.cpp
+++ b/src/sync-service/SyncManager_RepositoryEngine.cpp
@@ -1691,7 +1691,7 @@ RepositoryEngine::ReadSyncJobsDataFromDB(void) {
static char *UserKey = NULL;
static char *UserValue = NULL;
-
+static char empty_string[2] = {'\0'};
static void bundIterCb(const char *key, const char *value, void *user_data) {
LOG_LOGD("Callback");
@@ -1729,7 +1729,6 @@ RepositoryEngine::InsertSyncJobToDB(const char *SvcAppId, const char *PkgName, i
LOG_LOGD("Bundle Iterate");
bundle_iterate(UserData, bundIterCb, NULL);
}
- char empty_string[2] = {'\0'};
if (UserKey == NULL)
UserKey = empty_string;
if (UserValue == NULL)
@@ -1910,7 +1909,6 @@ RepositoryEngine::UpdateSyncJobToDB(const char *SvcAppId, int UserId, const char
bundle_iterate(UserData, bundIterCb, NULL);
}
- char empty_string[2] = {'\0'};
if (UserKey == NULL)
UserKey = empty_string;
if (UserValue == NULL)
diff --git a/src/sync-service/SyncManager_SyncWorker.cpp b/src/sync-service/SyncManager_SyncWorker.cpp
index a0e586a..ab90c28 100644
--- a/src/sync-service/SyncManager_SyncWorker.cpp
+++ b/src/sync-service/SyncManager_SyncWorker.cpp
@@ -122,8 +122,8 @@ SyncWorker::Finalize(void) {
pthread_mutex_destroy(&__pendingRequestsMutex);
if (__pSource) {
- g_source_unref(__pSource);
g_source_destroy(__pSource);
+ g_source_unref(__pSource);
}
if (__pChannel) {
g_io_channel_unref(__pChannel);