projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
743eb79
)
technology: Simplify set_powered function
author
Tomasz Bursztyka
<tomasz.bursztyka@linux.intel.com>
Tue, 2 Oct 2012 09:27:13 +0000
(12:27 +0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Wed, 3 Oct 2012 10:19:04 +0000
(13:19 +0300)
src/technology.c
patch
|
blob
|
history
diff --git
a/src/technology.c
b/src/technology.c
index 24949f25d6305d2ee459da4d3798892b678ad710..502cd60542c37a1fa1632d167f220c8b94650553 100644
(file)
--- a/
src/technology.c
+++ b/
src/technology.c
@@
-650,19
+650,15
@@
static DBusMessage *set_powered(struct connman_technology *technology,
DBusMessage *msg, connman_bool_t powered)
{
DBusMessage *reply = NULL;
- connman_bool_t persistent;
int err;
- if (powered == TRUE)
{
+ if (powered == TRUE)
err = technology_enable(technology, FALSE);
- persistent = TRUE;
- } else {
+ else
err = technology_disable(technology, FALSE);
- persistent = FALSE;
- }
if (err != -EBUSY) {
- technology->enable_persistent = p
ersistent
;
+ technology->enable_persistent = p
owered
;
technology_save(technology);
}