[evolution-data-server/evolution-data-server-3-12] addressbook: Fix cancellable handling if not in a transaction



commit 525839abfc93a4a1614c24a8e0137f09c7000d99
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Mon May 19 14:28:11 2014 +0100

    addressbook: Fix cancellable handling if not in a transaction
    
    If not in a transaction, ebsql_exec() will set a temporary GCancellable
    for the operation (transactions set their own), but would then
    erroneously clear *all* cancellables after the query finished; even
    those set by transactions.
    
    Coverity issue: #1214491
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730374

 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 fd44da6..d29e3f3 100644
--- a/addressbook/libedata-book/e-book-sqlite.c
+++ b/addressbook/libedata-book/e-book-sqlite.c
@@ -1093,7 +1093,7 @@ ebsql_exec (EBookSqlite *ebsql,
                had_cancel = TRUE;
        } else {
                ebsql->priv->cancel = cancellable;
-               had_cancel = TRUE;
+               had_cancel = FALSE;
        }
 
        ret = sqlite3_exec (ebsql->priv->db, stmt, callback, data, &errmsg);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]