[gnome-settings-daemon] smartcard: Set an error on cancellation



commit fc1f51cc010642cc13bd9f72a55d44dfc19ae5b7
Author: Philip Withnall <withnall endlessm com>
Date:   Thu Jan 19 20:23:29 2017 +0000

    smartcard: Set an error on cancellation
    
    All callers of watch_one_event_from_driver() expect that iff it returns
    FALSE, an error is set. That was not the case on the cancellation path.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777508

 plugins/smartcard/gsd-smartcard-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/smartcard/gsd-smartcard-manager.c b/plugins/smartcard/gsd-smartcard-manager.c
index a93f771..7fef9c5 100644
--- a/plugins/smartcard/gsd-smartcard-manager.c
+++ b/plugins/smartcard/gsd-smartcard-manager.c
@@ -189,7 +189,7 @@ watch_one_event_from_driver (GsdSmartcardManager       *self,
 
         g_cancellable_disconnect (cancellable, handler_id);
 
-        if (g_cancellable_is_cancelled (cancellable)) {
+        if (g_cancellable_set_error_if_cancelled (cancellable, error)) {
                 g_warning ("smartcard event function cancelled");
                 return FALSE;
         }


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