After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730374 - addressbook: Simplify cancellable handling
addressbook: Simplify cancellable handling
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2014-05-19 13:28 UTC by Philip Withnall
Modified: 2014-05-21 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
addressbook: Simplify cancellable handling (1.54 KB, patch)
2014-05-19 13:29 UTC, Philip Withnall
rejected Details | Review
addressbook: Fix cancellable handling if not in a transaction (1.11 KB, patch)
2014-05-20 10:41 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-05-19 13:28:59 UTC
Patch attached.
Comment 1 Philip Withnall 2014-05-19 13:29:01 UTC
Created attachment 276773 [details] [review]
addressbook: Simplify cancellable handling

This makes no functional changes to the code.

Coverity issue: #1214491
Comment 2 Milan Crha 2014-05-19 16:25:41 UTC
Review of attachment 276773 [details] [review]:

No, Coverity claim is valid, in uncovered an issue in the code and your fix didn't fix the issue. See how priv->cancel is used, it is set only during transaction, thus unsetting it in the ebsql_exec(), when in transaction, is wrong.
Comment 3 Philip Withnall 2014-05-20 10:41:02 UTC
Created attachment 276838 [details] [review]
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
Comment 4 Milan Crha 2014-05-21 12:10:05 UTC
Review of attachment 276838 [details] [review]:

Looks good, please commit. Thanks.
Comment 5 Philip Withnall 2014-05-21 12:45:38 UTC
Attachment 276838 [details] pushed as 525839a - addressbook: Fix cancellable handling if not in a transaction