From: Daniel Wagner <[email protected]>
The creation of a new session might be deferred. This happens
in the case where a policy plugin has to do some work async. For example
the plugin might have to ask a D-Bus config daemon.
---
src/manager.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/manager.c b/src/manager.c
index 205359a..d4f8c3d 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -338,8 +338,12 @@ static DBusMessage *create_session(DBusConnection *conn,
DBG("conn %p", conn);
err = __connman_session_create(msg);
- if (err < 0)
+ if (err < 0) {
+ if (err == -EINPROGRESS)
+ return NULL;
+
return __connman_error_failed(msg, -err);
+ }
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
@@ -426,7 +430,7 @@ static const GDBusMethodTable manager_methods[] = {
{ GDBUS_METHOD("UnregisterCounter",
GDBUS_ARGS({ "path", "o" }), NULL,
unregister_counter) },
- { GDBUS_METHOD("CreateSession",
+ { GDBUS_ASYNC_METHOD("CreateSession",
GDBUS_ARGS({ "settings", "a{sv}" },
{ "notifier", "o" }),
GDBUS_ARGS({ "session", "o" }),
--
1.7.12.1.382.gb0576a6
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman