From: Samuel Ortiz Date: Tue, 3 Aug 2010 14:28:46 +0000 (+0200) Subject: Do not try to enable a device if it's rfkill blocked X-Git-Tag: 2.0_alpha~2521 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55777f34e6e927406efdeff2e717d5d94796a2be;p=framework%2Fconnectivity%2Fconnman.git Do not try to enable a device if it's rfkill blocked --- diff --git a/src/device.c b/src/device.c index e3d4d04..87e3533 100644 --- a/src/device.c +++ b/src/device.c @@ -206,6 +206,9 @@ int __connman_device_enable(struct connman_device *device) if (device->powered_pending == TRUE) return -EALREADY; + if (device->blocked == TRUE) + return -ENOLINK; + err = device->driver->enable(device); if (err < 0) { if (err == -EINPROGRESS)