service: Do not report error twice
authorAlok Barsode <alok.barsode@linux.intel.com>
Wed, 29 Aug 2012 14:07:15 +0000 (17:07 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Thu, 30 Aug 2012 06:34:34 +0000 (09:34 +0300)
In request_input_cb(), __connman_service_indicate_error() unconditionally
reports an error via agent after determing the service state. The error
reporting and user connectable state will be properly handled by
service_indicate_state().

src/service.c

index e2fa389..48187c4 100644 (file)
@@ -4872,9 +4872,6 @@ static void request_input_cb (struct connman_service *service,
        } else if (err == -ENOKEY) {
                __connman_service_indicate_error(service,
                                        CONNMAN_SERVICE_ERROR_INVALID_KEY);
-               __connman_agent_report_error(service,
-                                       error2string(service->error),
-                                       report_error_cb, NULL);
        } else {
                /* It is not relevant to stay on Failure state
                 * when failing is due to wrong user input */