projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
407e177
)
modem: Don't allow setting online unless powered
author
Denis Kenzior
<denkenz@gmail.com>
Thu, 28 Apr 2011 14:48:48 +0000
(09:48 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Thu, 28 Apr 2011 14:48:48 +0000
(09:48 -0500)
src/modem.c
patch
|
blob
|
history
diff --git
a/src/modem.c
b/src/modem.c
index
9616a02
..
c60485a
100644
(file)
--- a/
src/modem.c
+++ b/
src/modem.c
@@
-707,6
+707,9
@@
static DBusMessage *set_property_online(struct ofono_modem *modem,
ofono_bool_t online;
const struct ofono_modem_driver *driver = modem->driver;
+ if (modem->powered == FALSE)
+ return __ofono_error_not_available(msg);
+
if (dbus_message_iter_get_arg_type(var) != DBUS_TYPE_BOOLEAN)
return __ofono_error_invalid_args(msg);