summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-05-03 12:55:19 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-05-04 11:29:09 +0300
commitc863ccb24e75656d90b533f1505f9f8000d9e006 (patch)
treef6dd1d3acdadc1f633cba09aac445cc1d3fb4380
parent9e68b80433556b992f8514324aa376a4173379a8 (diff)
downloadconnman-c863ccb24e75656d90b533f1505f9f8000d9e006.tar.gz
connman-c863ccb24e75656d90b533f1505f9f8000d9e006.tar.bz2
connman-c863ccb24e75656d90b533f1505f9f8000d9e006.zip
service: Do not stay on failure state when it is due to wrong user input
-rw-r--r--src/service.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c
index 3a046eab..75c392eb 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4339,6 +4339,10 @@ static void report_error_cb(struct connman_service *service,
if (retry == TRUE)
__connman_service_connect(service);
else {
+ /* It is not relevant to stay on Failure state
+ * when failing is due to wrong user input */
+ service->state = CONNMAN_SERVICE_STATE_IDLE;
+
service_complete(service);
__connman_connection_update_gateway();
}
@@ -4464,7 +4468,11 @@ static void request_input_cb (struct connman_service *service,
__connman_agent_report_error(service,
error2string(service->error),
report_error_cb, NULL);
- } else if (err == -EINVAL) {
+ } else {
+ /* It is not relevant to stay on Failure state
+ * when failing is due to wrong user input */
+ service->state = CONNMAN_SERVICE_STATE_IDLE;
+
service_complete(service);
__connman_connection_update_gateway();
}