Hi Marcel: We should set pending message to the created join service, so when connect successfully, we can return successful message. And the auto-scan can be stopped when connecting hidden network.
But I think the best way is to use __connman_service_connect() instead of join(). So we can easily handle it. If you agree with the way, I can give out the patch. >From 6240492920057d5918c08b94ad35f81bcb99d95e Mon Sep 17 00:00:00 2001 From: Martin Xu <[email protected]> Date: Wed, 8 Jul 2009 22:15:09 -0400 Subject: [PATCH 4/5] set pending message to join service --- src/device.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/device.c b/src/device.c index e50e9f0..df9d556 100644 --- a/src/device.c +++ b/src/device.c @@ -534,6 +534,7 @@ static DBusMessage *join_network(DBusConnection *conn, { struct connman_device *device = data; struct connman_network *network, *found_network; + struct connman_service *service; enum connman_network_type type; unsigned int ssid_size; const char *group, *mode, *security, *address; @@ -647,6 +648,9 @@ static DBusMessage *join_network(DBusConnection *conn, if (err < 0) return __connman_error_failed(msg, -err); + service = __connman_service_lookup_from_network(network); + __connman_service_set_pending(service, msg); + return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); } -- 1.6.1.3 _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
