From: Daniel Wagner Date: Wed, 31 Oct 2012 09:33:27 +0000 (+0100) Subject: manager: Allow async CreateSession method call X-Git-Tag: 1.10~220 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=728983ff6cd60fb9a827d76dbbc77f65c66783b3;p=platform%2Fupstream%2Fconnman.git manager: Allow async CreateSession method call The CreateSession D-Bus call should be marked as async call in order to allow the session core to defer the response. --- 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" }),