[evolution-data-server/evolution-data-server-3-12] Bug 735523 - Allow EBookSqlite to be used without transactions
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/evolution-data-server-3-12] Bug 735523 - Allow EBookSqlite to be used without transactions
- Date: Tue, 2 Sep 2014 13:35:15 +0000 (UTC)
commit 8a46a71473a182ac3ee30a73862e6c79b93d586e
Author: David Woodhouse <David Woodhouse intel com>
Date: Sat Aug 23 10:03:02 2014 -0500
Bug 735523 - Allow EBookSqlite to be used without transactions
If we use it without grouping changes into transactions by using
e_book_sqlite_lock(), and if we have a cancellation in the calls to
actually make the changes, then this warning triggers because the
new cancellation doesn't match the NULL that we have stored for the
non-existent overall transaction.
Yes, we probably ought to be using locking in EWS but we're not. It's
perfectly valid to make changes without a transaction lock. Shut up
about it.
(cherry picked from commit 629a98e292b9e4cb09408663af37477dc1a93f61)
addressbook/libedata-book/e-book-sqlite.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-sqlite.c b/addressbook/libedata-book/e-book-sqlite.c
index 0540ff7..9131c09 100644
--- a/addressbook/libedata-book/e-book-sqlite.c
+++ b/addressbook/libedata-book/e-book-sqlite.c
@@ -209,7 +209,7 @@ ebsql_init_debug (void)
#define EBSQL_LOCK_OR_RETURN(ebsql, cancellable, val) \
G_STMT_START { \
EBSQL_LOCK_MUTEX (&(ebsql)->priv->lock); \
- if (cancellable != NULL && \
+ if (cancellable != NULL && (ebsql)->priv->cancel && \
(ebsql)->priv->cancel != cancellable) { \
g_warning ("The GCancellable passed to `%s' " \
"is not the same as the cancel object " \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]