summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/service-api.txt4
-rw-r--r--src/service.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/service-api.txt b/doc/service-api.txt
index b4b60a76..ddf7f16c 100644
--- a/doc/service-api.txt
+++ b/doc/service-api.txt
@@ -74,6 +74,10 @@ Methods dict GetProperties()
This is similar to setting the Favorite property
to false, but that is currently not supported.
+ In the case a connection attempt failed and the
+ service is in the State=failure, this method can
+ also be used to reset the service.
+
Calling this method on Ethernet devices will cause
an error message. It is not possible to remove these
kind of devices.
diff --git a/src/service.c b/src/service.c
index 5a941bb2..9caa5057 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1071,7 +1071,8 @@ static DBusMessage *remove_service(DBusConnection *conn,
if (service->type == CONNMAN_SERVICE_TYPE_ETHERNET)
return __connman_error_not_supported(msg);
- if (service->favorite == FALSE)
+ if (service->favorite == FALSE &&
+ service->state != CONNMAN_SERVICE_STATE_FAILURE)
return __connman_error_not_supported(msg);
if (service->network != NULL) {
@@ -1096,6 +1097,8 @@ static DBusMessage *remove_service(DBusConnection *conn,
apn_changed(service);
+ set_idle(service);
+
connman_service_set_favorite(service, FALSE);
__connman_storage_save_service(service);