From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx> Replace the transport path with the device path and the profile id, which should be more relevant and also backend-agnostic. --- src/modules/bluetooth/bluetooth-util.c | 9 +++++---- src/modules/bluetooth/module-bluetooth-device.c | 11 +++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c index 9f7cf77..34db2ac 100644 --- a/src/modules/bluetooth/bluetooth-util.c +++ b/src/modules/bluetooth/bluetooth-util.c @@ -1266,7 +1266,7 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us goto fail; if (!dbus_message_iter_init(m, &arg_i)) { - pa_log("Failed to parse PropertyChanged for transport %s", t->path); + pa_log("Failed to parse PropertyChanged for transport %s", dbus_message_get_path(m)); goto fail; } @@ -2343,7 +2343,7 @@ void pa_bt_backend_notify_transport_removed(pa_bluetooth_transport *t) { old_any_connected = pa_bluetooth_device_any_audio_connected(d); - pa_log_debug("Removing transport %s profile %d", t->path, t->profile); + pa_log_debug("Removing transport for device %s profile %s", d->path, pa_bt_profile_to_string(t->profile)); d->transports[t->profile] = NULL; pa_hashmap_remove(y->transports, t->path); @@ -2367,7 +2367,7 @@ void pa_bt_backend_notify_state(pa_bluetooth_transport *t, pa_bluetooth_transpor if (t->state == state) return; - pa_log_debug("Transport %s (profile %s) changed state from %s to %s.", t->path, + pa_log_debug("Transport for device %s profile %s changed state from %s to %s.", d->path, pa_bt_profile_to_string(t->profile), transport_state_to_string(t->state), transport_state_to_string(state)); @@ -2388,7 +2388,8 @@ void pa_bt_backend_notify_nrec(pa_bluetooth_transport *t, bool nrec) { return; t->nrec = nrec; - pa_log_debug("Transport %s: Property 'NREC' changed to %s.", t->path, t->nrec ? "True" : "False"); + pa_log_debug("Transport for device %s profile %s: 'NREC' changed to %s.", d->path, pa_bt_profile_to_string(t->profile), + t->nrec ? "True" : "False"); pa_hook_fire(&y->hooks[PA_BLUETOOTH_HOOK_TRANSPORT_NREC_CHANGED], t); } diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 290f5ce..d397646 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -284,7 +284,7 @@ static void setup_stream(struct userdata *u) { struct pollfd *pollfd; int one; - pa_log_info("Transport %s resuming", u->transport->path); + pa_log_info("Transport for device %s profile %s resuming", u->device->path, pa_bt_profile_to_string(u->transport->profile)); bt_transport_config_mtu(u); @@ -350,7 +350,8 @@ static void bt_transport_release(struct userdata *u) { if (!u->transport_acquired) return; - pa_log_debug("Releasing transport %s", u->transport->path); + pa_log_debug("Releasing transport for device %s profile %s", u->device->path, + pa_bt_profile_to_string(u->transport->profile)); pa_bluetooth_transport_release(u->transport); @@ -365,14 +366,16 @@ static int bt_transport_acquire(struct userdata *u, bool optional) { if (u->transport_acquired) return 0; - pa_log_debug("Acquiring transport %s", u->transport->path); + pa_log_debug("Acquiring transport for device %s profile %s", u->device->path, + pa_bt_profile_to_string(u->transport->profile)); u->stream_fd = pa_bluetooth_transport_acquire(u->transport, optional, &u->read_link_mtu, &u->write_link_mtu); if (u->stream_fd < 0) return -1; u->transport_acquired = true; - pa_log_info("Transport %s acquired: fd %d", u->transport->path, u->stream_fd); + pa_log_info("Transport for device %s profile %s acquired: fd %d", u->device->path, + pa_bt_profile_to_string(u->transport->profile), u->stream_fd); return 0; } -- 1.8.1.4