From: Marcel Holtmann Date: Sun, 4 Jan 2009 19:52:07 +0000 (+0100) Subject: Don't attempt scanning if device is switched off X-Git-Tag: 0.7~87 X-Git-Url: http://git.maemo.org/git/?p=connman;a=commitdiff_plain;h=307c129f118759615c60832264b856b8ba63fef7 Don't attempt scanning if device is switched off --- diff --git a/src/device.c b/src/device.c index e63b8d2..f481175 100644 --- a/src/device.c +++ b/src/device.c @@ -393,6 +393,9 @@ static DBusMessage *propose_scan(DBusConnection *conn, if (!device->driver || !device->driver->scan) return __connman_error_not_supported(msg); + if (device->powered == FALSE) + return __connman_error_failed(msg); + err = device->driver->scan(device); if (err < 0) return __connman_error_failed(msg);