bluetooth: backend-native: Rename profile to object in register_profile*

This string contains a object path name, not a profile name, so lets
make this accurate.

This commit brings no functional change apart from a small change in the
text of one log message.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/593>
This commit is contained in:
João Paulo Rechi Vita 2019-09-10 16:08:52 -07:00 committed by Igor Kovalenko
parent 4b55b8a9d0
commit a631d4c07c

View file

@ -487,16 +487,16 @@ static void register_profile_reply(DBusPendingCall *pending, void *userdata) {
DBusMessage *r;
pa_dbus_pending *p;
pa_bluetooth_backend *b;
char *profile;
char *object;
pa_assert(pending);
pa_assert_se(p = userdata);
pa_assert_se(b = p->context_data);
pa_assert_se(profile = p->call_data);
pa_assert_se(object = p->call_data);
pa_assert_se(r = dbus_pending_call_steal_reply(pending));
if (dbus_message_is_error(r, BLUEZ_ERROR_NOT_SUPPORTED)) {
pa_log_info("Couldn't register profile %s because it is disabled in BlueZ", profile);
pa_log_info("Couldn't register object %s because this UUID is disabled in BlueZ", object);
goto finish;
}
@ -512,21 +512,21 @@ finish:
PA_LLIST_REMOVE(pa_dbus_pending, b->pending, p);
pa_dbus_pending_free(p);
pa_xfree(profile);
pa_xfree(object);
}
static void register_profile(pa_bluetooth_backend *b, const char *profile, const char *uuid) {
static void register_profile(pa_bluetooth_backend *b, const char *object, const char *uuid) {
DBusMessage *m;
DBusMessageIter i, d;
dbus_bool_t autoconnect;
dbus_uint16_t version, chan;
pa_log_debug("Registering Profile %s %s", profile, uuid);
pa_log_debug("Registering Profile %s %s", object, uuid);
pa_assert_se(m = dbus_message_new_method_call(BLUEZ_SERVICE, "/org/bluez", BLUEZ_PROFILE_MANAGER_INTERFACE, "RegisterProfile"));
dbus_message_iter_init_append(m, &i);
pa_assert_se(dbus_message_iter_append_basic(&i, DBUS_TYPE_OBJECT_PATH, &profile));
pa_assert_se(dbus_message_iter_append_basic(&i, DBUS_TYPE_OBJECT_PATH, &object));
pa_assert_se(dbus_message_iter_append_basic(&i, DBUS_TYPE_STRING, &uuid));
dbus_message_iter_open_container(&i, DBUS_TYPE_ARRAY,
DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
@ -546,7 +546,7 @@ static void register_profile(pa_bluetooth_backend *b, const char *profile, const
}
dbus_message_iter_close_container(&i, &d);
send_and_add_to_pending(b, m, register_profile_reply, pa_xstrdup(profile));
send_and_add_to_pending(b, m, register_profile_reply, pa_xstrdup(object));
}
static void transport_put(pa_bluetooth_transport *t)