diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-10-31 10:33:27 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-11-05 14:40:03 +0200 |
commit | 728983ff6cd60fb9a827d76dbbc77f65c66783b3 (patch) | |
tree | 0c9cd3298103006237a652d3312e7a85c2f6384f /src/manager.c | |
parent | 7b067f2681d69fb9690f4d6b4e2ef62485ea4fd2 (diff) | |
download | connman-728983ff6cd60fb9a827d76dbbc77f65c66783b3.tar.gz connman-728983ff6cd60fb9a827d76dbbc77f65c66783b3.tar.bz2 connman-728983ff6cd60fb9a827d76dbbc77f65c66783b3.zip |
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.
Diffstat (limited to 'src/manager.c')
-rw-r--r-- | src/manager.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/manager.c b/src/manager.c index 205359a9..d4f8c3df 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" }), |