projects
/
platform
/
upstream
/
neard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f777d8e
)
adapter: Do not send a poll command when adapter is down
author
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 11 Oct 2013 15:40:51 +0000
(17:40 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 11 Oct 2013 15:40:51 +0000
(17:40 +0200)
No need to go through the kernel netlink NFC API if the adapter is known
to be down.
src/adapter.c
patch
|
blob
|
history
diff --git
a/src/adapter.c
b/src/adapter.c
index
0b85ef5
..
e91fc30
100644
(file)
--- a/
src/adapter.c
+++ b/
src/adapter.c
@@
-444,6
+444,11
@@
static DBusMessage *start_poll_loop(DBusConnection *conn,
DBG("conn %p", conn);
+ if (!adapter->powered) {
+ near_error("Adapter is down, can not start polling");
+ return __near_error_failed(msg, ENODEV);
+ }
+
dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &dbus_mode,
DBUS_TYPE_INVALID);