projects
/
connman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don't attempt scanning if device is switched off
[connman]
/
src
/
device.c
diff --git
a/src/device.c
b/src/device.c
index
e63b8d2
..
f481175
100644
(file)
--- 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);