Below is a patch for:
http://bugs.meego.com/show_bug.cgi?id=8747
http://bugs.meego.com/show_bug.cgi?id=8866
When offlinemode is on and device is enabled using enable-device test script,
the Powered property is set to true. The device set_property sets
powered_persistent to TRUE and writes this to the active profile. The device is
then enabled and offlinemode is set to FALSE. But this data is not written to
the active profile.
In __connman_device_enable() after setting offlinmode to FALSE, if
powered_persistent is TRUE then saving the profile will fix this issue.
Patch
---
src/device.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index f79e991..2bb56f7 100644
--- a/src/device.c
+++ b/src/device.c
@@ -221,8 +221,12 @@ int __connman_device_enable(struct connman_device *device)
if (err == -EINPROGRESS) {
device->powered_pending = TRUE;
device->offlinemode = FALSE;
- if (__connman_profile_get_offlinemode() == TRUE)
+ if (__connman_profile_get_offlinemode() == TRUE) {
__connman_profile_set_offlinemode(FALSE, FALSE);
+
+ if (device->powered_persistent == TRUE)
+ __connman_profile_save_default();
+ }
}
return err;
}
@@ -230,9 +234,13 @@ int __connman_device_enable(struct connman_device *device)
device->powered_pending = TRUE;
device->powered = TRUE;
device->offlinemode = FALSE;
- if (__connman_profile_get_offlinemode() == TRUE)
+ if (__connman_profile_get_offlinemode() == TRUE) {
__connman_profile_set_offlinemode(FALSE, FALSE);
+ if (device->powered_persistent == TRUE)
+ __connman_profile_save_default();
+ }
+
__connman_technology_enable_device(device);
return 0;
---
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not the
intended recipient, you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately and destroy all copies of this message and
any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted by this
email.
www.wipro.com
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman