[gnome-settings-daemon] rfkill: Limit 2-step unlocking to Bluetooth rfkill



commit eb4fad0fb7024a5951a822076f7868b30dbd2614
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Jan 10 13:14:33 2016 +0100

    rfkill: Limit 2-step unlocking to Bluetooth rfkill
    
    In 5f29c37ed0fd8c7496a071b8b5fa74cd861e1886 we added a two-step
    mechanism to avoid Bluetooth rfkills from being stuck in rfkill'ed mode.
    The problem is that the 2-step unblocking will take Bluetooth adapters
    out of rfkill even if they were disabled when we went into airplane
    mode.
    
    So only apply this two-step unlocking when enabling Bluetooth.

 plugins/rfkill/rfkill-glib.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/rfkill/rfkill-glib.c b/plugins/rfkill/rfkill-glib.c
index 133b2fe..6da3bb0 100644
--- a/plugins/rfkill/rfkill-glib.c
+++ b/plugins/rfkill/rfkill-glib.c
@@ -198,7 +198,8 @@ write_change_all_done_cb (GObject      *source_object,
        if (ret < 0) {
                g_simple_async_result_take_error (rfkill->priv->simple, error);
                goto bail;
-       } else if (rfkill->priv->event->soft == 1) {
+       } else if (rfkill->priv->event->soft == 1 ||
+                  rfkill->priv->event->type != RFKILL_TYPE_BLUETOOTH) {
                g_simple_async_result_set_op_res_gboolean (rfkill->priv->simple, ret >= 0);
                goto bail;
        }


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