Unregister an observer for Manufacturer Specific Data and avoid to send broadcaster to this agent. --- src/adapter.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index e5237b5..b2c052f 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -1693,6 +1693,21 @@ static DBusMessage *register_manufobserver(DBusConnection *conn, static DBusMessage *unregister_manufobserver(DBusConnection *conn, DBusMessage *msg, void *data) { + const char *path, *sender = dbus_message_get_sender(msg); + struct btd_adapter *adapter = data; + int err; + + if (dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &path, + DBUS_TYPE_INVALID) == FALSE) + return btd_error_invalid_args(msg); + + err = mgmt_set_observer(adapter->dev_id, FALSE); + if (err < 0) + return btd_error_failed(msg, strerror(-err)); + + DBG("Manufacturer Specific Data Observer unregistered for hci%d at " + "%s:%s", adapter->dev_id, sender, path); + return dbus_message_new_method_return(msg); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html