ACCOUNT_GET_GLOBAL_DB_PATH(account_db_path, sizeof(account_db_path));
if (g_hAccountGlobalDB) {
- _ERR("Account database is using in another app. %x", g_hAccountDB);
+ _ERR("Account database is using in another app");
return _ACCOUNT_ERROR_DATABASE_BUSY;
}
ACCOUNT_GET_USER_DB_PATH(account_db_path, sizeof(account_db_path), uid);
if (g_hAccountDB) {
- _ERR("Account database is using in another app. %x", g_hAccountDB);
+ _ERR("Account database is using in another app");
return _ACCOUNT_ERROR_DATABASE_BUSY;
}
if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(g_hAccountDB));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}
rc = _account_query_finalize(hstmt);
rc = _account_query_step(hstmt);
if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(g_hAccountDB));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}
return _ACCOUNT_ERROR_NONE;
}
- ACCOUNT_DEBUG("app id", app_id);
+ ACCOUNT_DEBUG("app id[%s]", app_id);
ACCOUNT_MEMSET(query, 0x00, sizeof(query));
if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(account_db_handle));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}
rc = _account_query_finalize(hstmt);
if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(account_db_handle));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}
rc = _account_query_finalize(hstmt);
rc = _account_query_finalize(hstmt);
if (rc != _ACCOUNT_ERROR_NONE) {
_account_type_gslist_account_type_free(account_type_list);
- ACCOUNT_ERROR("finalize error(%s)", rc);
+ ACCOUNT_ERROR("finalize error(%d)", rc);
error_code = rc;
goto CATCH;
}
if (hstmt != NULL) {
rc = _account_query_finalize(hstmt);
if (rc != _ACCOUNT_ERROR_NONE) {
- ACCOUNT_ERROR("finalize error(%s)", rc);
+ ACCOUNT_ERROR("finalize error(%d)", rc);
return rc;
}
hstmt = NULL;
rc = _account_query_finalize(hstmt);
if (rc != _ACCOUNT_ERROR_NONE) {
_account_type_gslist_account_type_free(account_type_list);
- ACCOUNT_ERROR("finalize error(%s)", rc);
+ ACCOUNT_ERROR("finalize error(%d)", rc);
*error_code = rc;
goto CATCH;
}
rc = _account_get_record_count(g_hAccountDB, query);
if (_account_db_err_code(g_hAccountDB) == SQLITE_PERM) {
- ACCOUNT_ERROR("Access failed(%d, %s)", _account_db_err_msg(g_hAccountDB));
+ ACCOUNT_ERROR("Access failed(%s)", _account_db_err_msg(g_hAccountDB));
return _ACCOUNT_ERROR_PERMISSION_DENIED;
}
if (rc == SQLITE_BUSY) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(g_hAccountDB));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DATABASE_BUSY;
} else if (rc != SQLITE_DONE) {
ACCOUNT_ERROR("_account_query_step() failed(%d, %s)", rc, _account_db_err_msg(g_hAccountDB));
+ if (_account_query_finalize(hstmt) != _ACCOUNT_ERROR_NONE)
+ _ERR("finalize error - account_query_step() failed");
return _ACCOUNT_ERROR_DB_FAILED;
}