summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
authorGuillaume Zajac <guillaume.zajac@linux.intel.com>2011-06-28 15:19:12 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-06-30 11:59:58 +0200
commitea81b3269f9f507a6be8d139662e1c1d387e9417 (patch)
tree2ec62973f8b408153505e0753cc62149da99f6aa /src/manager.c
parentc8106a94a3369a98e9eafba941beb84773156f7c (diff)
downloadconnman-ea81b3269f9f507a6be8d139662e1c1d387e9417.tar.gz
connman-ea81b3269f9f507a6be8d139662e1c1d387e9417.tar.bz2
connman-ea81b3269f9f507a6be8d139662e1c1d387e9417.zip
tethering: Update APIs to be able to use multiple private networks
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/manager.c b/src/manager.c
index e8833646..722d6216 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -613,14 +613,15 @@ static DBusMessage *request_private_network(DBusConnection *conn,
static DBusMessage *release_private_network(DBusConnection *conn,
DBusMessage *msg, void *data)
{
- const char *sender;
+ const char *path;
int err;
DBG("conn %p", conn);
- sender = dbus_message_get_sender(msg);
+ dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &path,
+ DBUS_TYPE_INVALID);
- err = __connman_private_network_release(sender);
+ err = __connman_private_network_release(path);
if (err < 0)
return __connman_error_failed(msg, -err);
@@ -651,10 +652,10 @@ static GDBusMethodTable manager_methods[] = {
{ "UnregisterCounter", "o", "", unregister_counter },
{ "CreateSession", "a{sv}o", "o", create_session },
{ "DestroySession", "o", "", destroy_session },
- { "RequestPrivateNetwork", "", "ha{sv}",
+ { "RequestPrivateNetwork", "", "oa{sv}h",
request_private_network,
G_DBUS_METHOD_FLAG_ASYNC },
- { "ReleasePrivateNetwork", "", "",
+ { "ReleasePrivateNetwork", "o", "",
release_private_network },
{ },
};