diff --git a/doc/profile-api.txt b/doc/profile-api.txt
index 639202f..d410750 100644
--- a/doc/profile-api.txt
+++ b/doc/profile-api.txt
profile, because when this method gets called it has
already been unregistered.
- void NewConnection(object device, fd)
+ void NewConnection(object device, fd, dict fd_properties)
This method gets called when a new service level
connection has been made and authorized.
diff --git a/src/profile.c b/src/profile.c
index eb63e1e..f756fcf 100644
--- a/src/profile.c
+++ b/src/profile.c
struct btd_device *dev)
{
DBusMessage *msg;
+ DBusMessageIter iter, dict;
const char *path;
int fd;
return false;
}
+ dbus_message_iter_init_append(msg, &iter);
+
path = device_get_path(dev);
+ dbus_message_iter_append_basic(&iter, DBUS_TYPE_OBJECT_PATH, &path);
+
fd = g_io_channel_unix_get_fd(conn->io);
+ dbus_message_iter_append_basic(&iter, DBUS_TYPE_UNIX_FD, &fd);
+
+ dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &dict);
+
+ /* fd properties go here */
- dbus_message_append_args(msg, DBUS_TYPE_OBJECT_PATH, &path,
- DBUS_TYPE_UNIX_FD, &fd,
- DBUS_TYPE_INVALID);
+ dbus_message_iter_close_container(&iter, &dict);
if (!dbus_connection_send_with_reply(btd_get_dbus_connection(),
msg, &conn->new_conn, -1)) {
diff --git a/test/test-profile b/test/test-profile
index 2d66444..1c361c9 100755
--- a/test/test-profile
+++ b/test/test-profile
print("Cancel")
@dbus.service.method("org.bluez.Profile",
- in_signature="oh", out_signature="")
- def NewConnection(self, path, fd):
+ in_signature="oha{sv}", out_signature="")
+ def NewConnection(self, path, fd, properties):
fd = fd.take()
print("NewConnection(%s, %d)" % (path, fd))
os.close(fd)