service: Use boolean variable to determine valid values
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 2 Dec 2011 14:18:24 +0000 (16:18 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 12 Dec 2011 09:44:40 +0000 (10:44 +0100)
Use the provided boolean variable to determine when valid
values are passed to the authentication_cb_t function.

src/service.c

index 214cc8c..a0a29bc 100644 (file)
@@ -3951,12 +3951,13 @@ static void report_error_cb(struct connman_service *service,
 }
 
 static void request_input_cb (struct connman_service *service,
+                       connman_bool_t values_received,
                        const char *identity, const char *passphrase,
                        void *user_data)
 {
        DBG ("RequestInput return, %p", service);
 
-       if (identity == NULL && passphrase == NULL && service->wps == FALSE) {
+       if (values_received == FALSE) {
                service_complete(service);
                services_changed(FALSE);
                __connman_device_request_scan(CONNMAN_DEVICE_TYPE_UNKNOWN);