summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunghyun Kwon <sh0701.kwon@samsung.com>2013-04-15 20:32:52 +0900
committerSunghyun Kwon <sh0701.kwon@samsung.com>2013-04-15 20:32:52 +0900
commit4297497be23aedd93bb4c88aed22ebcfa3b325b2 (patch)
treec2f286609b6dac5061b0a1f40905377fe7394e99
parentf952a09030d7c055a586d52a768de8b28130bd23 (diff)
parent347625674e289b0524fc64171d36ba1b6a8a51bd (diff)
downloademail-service-4297497be23aedd93bb4c88aed22ebcfa3b325b2.tar.gz
email-service-4297497be23aedd93bb4c88aed22ebcfa3b325b2.tar.bz2
email-service-4297497be23aedd93bb4c88aed22ebcfa3b325b2.zip
Fixed the conflict merge
-rwxr-xr-xemail-core/email-storage/email-storage.c18
-rwxr-xr-xutilities/test-application/testapp-others.c2
2 files changed, 2 insertions, 18 deletions
diff --git a/email-core/email-storage/email-storage.c b/email-core/email-storage/email-storage.c
index e556bfc..9618f03 100755
--- a/email-core/email-storage/email-storage.c
+++ b/email-core/email-storage/email-storage.c
@@ -187,8 +187,6 @@
}
/* for safety DB operation */
-static pthread_mutex_t _transactionBeginLock = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t _transactionEndLock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _db_handle_lock = PTHREAD_MUTEX_INITIALIZER;
#define _MULTIPLE_DB_HANDLE
@@ -1382,9 +1380,6 @@ static void _emstorage_close_once(void)
{
EM_DEBUG_FUNC_BEGIN();
- DELETE_CRITICAL_SECTION(_transactionBeginLock);
- DELETE_CRITICAL_SECTION(_transactionEndLock);
-
EM_DEBUG_FUNC_END();
}
@@ -1618,9 +1613,6 @@ INTERNAL_FUNC int emstorage_db_close(int *err_code)
int error = EMAIL_ERROR_NONE;
int ret = false;
- DELETE_CRITICAL_SECTION(_transactionBeginLock);
- DELETE_CRITICAL_SECTION(_transactionEndLock);
-
if (_db_handle) {
ret = db_util_close(_db_handle);
@@ -10319,8 +10311,6 @@ INTERNAL_FUNC int emstorage_begin_transaction(void *d1, void *d2, int *err_code)
EM_PROFILE_BEGIN(emStorageBeginTransaction);
int ret = true;
- ENTER_CRITICAL_SECTION(_transactionBeginLock);
-
/* wait for the trnasaction authority to be changed. */
while (g_transaction) {
EM_DEBUG_LOG(">>>>>>>> Wait for the transaction authority to be changed");
@@ -10330,8 +10320,6 @@ INTERNAL_FUNC int emstorage_begin_transaction(void *d1, void *d2, int *err_code)
/* take the transaction authority. */
g_transaction = true;
- LEAVE_CRITICAL_SECTION(_transactionBeginLock);
-
sqlite3 *local_db_handle = emstorage_get_db_connection();
int rc;
EMSTORAGE_PROTECTED_FUNC_CALL(sqlite3_exec(local_db_handle, "BEGIN immediate;", NULL, NULL, NULL), rc);
@@ -10356,15 +10344,12 @@ INTERNAL_FUNC int emstorage_commit_transaction(void *d1, void *d2, int *err_code
int ret = true;
sqlite3 *local_db_handle = emstorage_get_db_connection();
- ENTER_CRITICAL_SECTION(_transactionEndLock);
-
int rc;
EMSTORAGE_PROTECTED_FUNC_CALL(sqlite3_exec(local_db_handle, "END;", NULL, NULL, NULL), rc);
EM_DEBUG_DB_EXEC(SQLITE_OK != rc, {ret = false; }, ("SQL(END) exec error:%d -%s", rc, sqlite3_errmsg(local_db_handle)));
/* release the transaction authority. */
g_transaction = false;
- LEAVE_CRITICAL_SECTION(_transactionEndLock);
if (ret == false && err_code != NULL)
*err_code = EMAIL_ERROR_DB_FAILURE;
@@ -10380,6 +10365,7 @@ INTERNAL_FUNC int emstorage_rollback_transaction(void *d1, void *d2, int *err_co
int rc;
EMSTORAGE_PROTECTED_FUNC_CALL(sqlite3_exec(local_db_handle, "ROLLBACK;", NULL, NULL, NULL), rc);
+
EM_DEBUG_DB_EXEC(SQLITE_OK != rc, {ret = false; },
("SQL(ROLLBACK) exec error:%d -%s", rc, sqlite3_errmsg(local_db_handle)));
@@ -10388,8 +10374,6 @@ INTERNAL_FUNC int emstorage_rollback_transaction(void *d1, void *d2, int *err_co
/* release the transaction authority. */
g_transaction = false;
- LEAVE_CRITICAL_SECTION(_transactionEndLock);
-
if (ret == false && err_code != NULL)
*err_code = EMAIL_ERROR_DB_FAILURE;
diff --git a/utilities/test-application/testapp-others.c b/utilities/test-application/testapp-others.c
index 14d3dd3..487bc46 100755
--- a/utilities/test-application/testapp-others.c
+++ b/utilities/test-application/testapp-others.c
@@ -208,7 +208,7 @@ FINISH_OFF:
return error;
}
-#define LIB_EMAIL_SERVICE_PATH "/usr/lib/libemail-api.so"
+#define LIB_EMAIL_SERVICE_PATH LIBPATH "libemail-api.so"
int (*Datastore_FI_EMTB)(char **);
int (*Datastore_FI_EMSB)(char **);