From 6c1c909876d619b39f80c198ccbe3db354890ca2 Mon Sep 17 00:00:00 2001 From: Alok Barsode Date: Wed, 24 Aug 2011 16:44:08 +0300 Subject: [PATCH] device: Update profile in enable_persistent callback --- src/device.c | 14 +------------- src/technology.c | 5 +++++ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/device.c b/src/device.c index be184e1..155018a 100644 --- a/src/device.c +++ b/src/device.c @@ -740,25 +740,13 @@ static int device_scan(struct connman_device *device) int __connman_device_enable_persistent(struct connman_device *device) { - int err; - DBG("device %p", device); device->powered_persistent = TRUE; __connman_storage_save_device(device); - err = __connman_device_enable(device); - if (err == 0 || err == -EINPROGRESS) { - device->offlinemode = FALSE; - if (__connman_profile_get_offlinemode() == TRUE) { - __connman_profile_set_offlinemode(FALSE, FALSE); - - __connman_profile_save_default(); - } - } - - return err; + return __connman_device_enable(device); } int __connman_device_disable_persistent(struct connman_device *device) diff --git a/src/technology.c b/src/technology.c index cb065e2..2e91b41 100644 --- a/src/technology.c +++ b/src/technology.c @@ -693,6 +693,11 @@ int __connman_technology_enabled(enum connman_service_type type) state_changed(technology); } + if (__connman_profile_get_offlinemode() == TRUE) { + __connman_profile_set_offlinemode(FALSE, FALSE); + __connman_profile_save_default(); + } + return 0; } -- 2.7.4