bluez5: don't add transport twice in the device transports list

The transport is already added in profile_new_connection(), unless
is_new is TRUE

Apart from being wrong, adding the same node twice in a list also causes
spa_list_foreach() to loop forever...
This commit is contained in:
George Kiagiadakis 2020-06-10 17:01:01 +03:00
parent b71efadb7a
commit da9d17e73e

View file

@ -1097,6 +1097,7 @@ static DBusHandlerResult endpoint_set_configuration(DBusConnection *conn,
spa_log_warn(monitor->log, "no device found for transport");
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
if (is_new)
spa_list_append(&transport->device->transport_list, &transport->device_link);
device_connect_profile(transport->device, transport->profile);