Previously when querying the SSID from client through the agent api,
the request was sent to default agent rather than sender, as
get_dbus_sender returns NULL if service->pending is NULL, causing a
request to the default agent.
---
 src/service.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/service.c b/src/service.c
index 8feb0f4..51fd829 100644
--- a/src/service.c
+++ b/src/service.c
@@ -6040,6 +6040,7 @@ int __connman_service_connect(struct connman_service 
*service,
        if (service->connect_reason == CONNMAN_SERVICE_CONNECT_REASON_USER) {
                if (err == -ENOKEY || err == -EPERM) {
                        DBusMessage *pending = NULL;
+                       const char *sender = get_dbus_sender(service);
 
                        /*
                         * We steal the reply here. The idea is that the
@@ -6053,9 +6054,7 @@ int __connman_service_connect(struct connman_service 
*service,
                        }
 
                        err = __connman_agent_request_passphrase_input(service,
-                                       request_input_cb,
-                                       get_dbus_sender(service),
-                                       pending);
+                                       request_input_cb, sender, pending);
                        if (service->hidden && err != -EINPROGRESS)
                                service->pending = pending;
 
-- 
2.1.0

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to