| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This adds experimental field to btd_profile so the plugin can indicate
drivers that depends on experimental to be enabled.
|
|
|
|
|
|
|
|
|
|
| |
This ensures any incoming profile connection will be blocked if its UUID
is not allowed by the following assumption:
1. Each system profile asks adapter authorization when seeing a incoming
connection.
2. Each external profile checks if its UUID is allowed by adapter when
seeing a incoming connection.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a process tries to register a profile implementation that is already
registered, RegisterProfile should fail.
This should help address issues when two instances of PulseAudio are
running at the same time, and the second instance tries to register an
audio profile implementation that has already been registered by the
first instance. Two situations where this may happen is when more than
one user is logged in, or during the transition between the GDM session
and the user session, when PulseAudio gets started on the new session
before the old session has been fully terminated.
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/303
https://gitlab.gnome.org/GNOME/gdm/-/issues/486
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds SPDX License Identifier and removes the license text.
-------------------------------------
License COUNT
-------------------------------------
LGPL-2.1-or-later : 62
GPL-2.0-or-later : 51
BSD-2-Clause : 2
License: LGPL-2.1-or-later
src/adv_monitor.c
src/adv_monitor.h
src/shared/mainloop-glib.c
src/shared/btp.c
src/shared/tester.c
src/shared/btsnoop.c
src/shared/gatt-helpers.h
src/shared/log.h
src/shared/util.h
src/shared/mainloop-ell.c
src/shared/hci-crypto.c
src/shared/mainloop.c
src/shared/hfp.h
src/shared/mainloop-notify.c
src/shared/io-mainloop.c
src/shared/btsnoop.h
src/shared/uhid.h
src/shared/util.c
src/shared/ringbuf.c
src/shared/btp.h
src/shared/shell.h
src/shared/io-glib.c
src/shared/queue.h
src/shared/gatt-server.h
src/shared/crypto.c
src/shared/crypto.h
src/shared/io-ell.c
src/shared/timeout-glib.c
src/shared/mgmt.c
src/shared/gatt-db.c
src/shared/mainloop-notify.h
src/shared/hfp.c
src/shared/timeout-ell.c
src/shared/shell.c
src/shared/hci.c
src/shared/log.c
src/shared/ringbuf.h
src/shared/gatt-helpers.c
src/shared/queue.c
src/shared/tty.h
src/shared/timeout-mainloop.c
src/shared/tester.h
src/shared/gap.h
src/shared/mgmt.h
src/shared/gatt-db.h
src/shared/uhid.c
src/shared/mainloop.h
src/shared/timeout.h
src/shared/att-types.h
src/shared/pcap.c
src/shared/gap.c
src/shared/att.c
src/shared/pcap.h
src/shared/hci.h
src/shared/gatt-client.h
src/shared/io.h
src/shared/gatt-client.c
src/shared/ad.c
src/shared/att.h
src/shared/gatt-server.c
src/shared/hci-crypto.h
src/shared/ad.h
License: GPL-2.0-or-later
src/attrib-server.h
src/advertising.h
src/textfile.c
src/attrib-server.c
src/uinput.h
src/log.h
src/eir.h
src/sdpd.h
src/sdpd-request.c
src/service.h
src/sdpd-database.c
src/adapter.h
src/plugin.h
src/uuid-helper.h
src/plugin.c
src/main.c
src/sdp-xml.c
src/error.h
src/oui.c
src/device.c
src/agent.h
src/sdp-client.c
src/oui.h
src/device.h
src/gatt-database.c
src/error.c
src/backtrace.c
src/sdpd-server.c
src/adapter.c
src/log.c
src/agent.c
src/backtrace.h
src/sdp-xml.h
src/hcid.h
src/dbus-common.h
src/uuid-helper.c
src/storage.c
src/profile.c
src/advertising.c
src/storage.h
src/dbus-common.c
src/profile.h
src/sdpd-service.c
src/eir.c
src/sdp-client.h
src/gatt-database.h
src/gatt-client.h
src/rfkill.c
src/gatt-client.c
src/service.c
src/textfile.h
License: BSD-2-Clause
src/shared/ecc.h
src/shared/ecc.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some bluetooth headsets do not support connecting more then one bluetooth
profile (e.g. in parallel A2DP and HSP, or HSP and HFP) and issuing
connect() syscall for second profile returns just ECONNREFUSED.
Prior this patch bluetooth daemon for such situation reported following
message to log:
Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
Message is incorrect as connect() syscall failed, not getpeername(). This
patch fixes this problem and logs correct error message:
Headset Voice gateway failed connect to XX:XX:XX:XX:XX:XX: Connection refused (111)
Main problem was in ext_connect() function which called bt_io_get() for
retrieving remote address (BT_IO_OPT_DEST) and if it failed then original
error from connect() syscall was masked. Because it is not possible to
retrieve BT_IO_OPT_DEST for unconnected socket, original destination
address for error message is propagated via connect_add() function in btio.
|
|
|
|
| |
HSP AG role doesn't have any supported features.
|
|
|
|
| |
This would allow D-Bus agents to implement HS role of HSP profile.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remote Audio Volume Control property in SDP record for HSP HS role
indicates if device supports volume control.
It is required for D-Bus agents which implements audio part of HSP
profile to know if remote device supports volume control or not.
With this change bluez exports status of this SDP property via firt bit
in Features entry in NewConnection() DBus callback method, like for HFP
profile.
|
|
|
|
| |
These values are always set later by send_new_connection.
|
|
|
|
|
| |
When HFP AG features are not set then according to HFP 1.7.2
specification it has value 0b001001.
|
| |
|
|
|
|
|
|
| |
Add changes to update HFP version to 0x0107 for HFP_HS_UUID and
HFP_AG_UUID. Ofono get this version from bluez and enable HFP 1.7
specific commands.
|
|
|
|
|
|
| |
service_accept shall only be used with profiles that implement .accept
callback, to set connecting state directly use service_set_connecting
which does not require .accept to be implemented.
|
|
|
|
|
|
|
|
|
|
| |
This fixes the flawed logic from the following commit:
commit b669604f43bbbf04ebaa66dd14ad9cfb005e561b
Author: Hsin-Yu Chao <hychao@chromium.org>
Date: Fri Apr 24 10:36:09 2015 -0700
src/profile: Set service to connecting in ext_connect
|
|
|
|
|
|
| |
Profiles under ext_profiles are local and should no be mixed with other
external profiles since its type is different which can may cause invalid
memory when accessing member of ext_profile struct.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change that made the 'deviceinfo' profile "external" had an side
effect, now it is possible to have an external profile without 'owner'
and 'path' information. The fix considers that having an external
profile without that information is not an error.
Valgrind log:
bluetoothd[9974]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[9974]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[9974]: Endpoint registered: sender=:1.38 path=/MediaEndpoint/A2DPSink
bluetoothd[9974]: src/profile.c:register_profile() sender :1.38 path /Profile/HSPAGProfile
==9974== Invalid read of size 1
==9974== at 0x65F21E0: __strcmp_sse2_unaligned (in /usr/x86_64-pc-linux-gnu/lib/libc-2.22.so)
==9974== by 0x4E6C7E8: g_str_equal (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4600.1)
==9974== by 0x467917: find_ext_profile (profile.c:745)
==9974== by 0x469A8D: register_profile (profile.c:2373)
==9974== by 0x4889C3: process_message.isra.5 (object.c:259)
==9974== by 0x518E33E: _dbus_object_tree_dispatch_and_unlock (in /usr/x86_64-pc-linux-gnu/lib/libdbus-1.so.3.14.3)
==9974== by 0x51805E3: dbus_connection_dispatch (in /usr/x86_64-pc-linux-gnu/lib/libdbus-1.so.3.14.3)
==9974== by 0x4856DF: message_dispatch (mainloop.c:72)
==9974== by 0x4E7C669: g_main_context_dispatch (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4600.1)
==9974== by 0x4E7C9E7: g_main_context_iterate.isra.29 (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4600.1)
==9974== by 0x4E7CD01: g_main_loop_run (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4600.1)
==9974== by 0x40BABE: main (main.c:661)
==9974== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==9974==
==9974==
==9974== Process terminating with default action of signal 11 (SIGSEGV)
==9974== Access not within mapped region at address 0x0
==9974== at 0x65F21E0: __strcmp_sse2_unaligned (in /usr/x86_64-pc-linux-gnu/lib/libc-2.22.so)
==9974== by 0x4E6C7E8: g_str_equal (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4600.1)
==9974== by 0x467917: find_ext_profile (profile.c:745)
==9974== by 0x469A8D: register_profile (profile.c:2373)
==9974== by 0x4889C3: process_message.isra.5 (object.c:259)
==9974== by 0x518E33E: _dbus_object_tree_dispatch_and_unlock (in /usr/x86_64-pc-linux-gnu/lib/libdbus-1.so.3.14.3)
==9974== by 0x51805E3: dbus_connection_dispatch (in /usr/x86_64-pc-linux-gnu/lib/libdbus-1.so.3.14.3)
==9974== by 0x4856DF: message_dispatch (mainloop.c:72)
==9974== by 0x4E7C669: g_main_context_dispatch (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4600.1)
==9974== by 0x4E7C9E7: g_main_context_iterate.isra.29 (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4600.1)
==9974== by 0x4E7CD01: g_main_loop_run (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4600.1)
==9974== by 0x40BABE: main (main.c:661)
==9974== If you believe this happened as a result of a stack
==9974== overflow in your program's main thread (unlikely but
==9974== possible), you can try to increase the size of the
==9974== main thread stack using the --main-stacksize= flag.
==9974== The main thread stack size used in this run was 8388608.
==9974==
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cleanup code related to service probe making it use a single
function, because of that now all driver must implement device_probe in
order for the service probe to work properly.
In addition to that a new flag called external was introduced to
btd_profile to be possible to distinguish whether it is a internal
plugin or external client, this was needed in order to decide if an
attribute should be claimed which whould prevent it to be exported over
D-Bus.
|
|
|
|
|
|
|
|
|
|
| |
As per the MAP & PBAP v1.2 SDP table, it should contain the GoepL2CapPsm
in its SDP record. This patch adds the same.
The below test cases verifies the presence of GoepL2CapPsm attribute is
in SDP record.
TC_PSE_CON_BV_02_C - PASS
TC_MSE_CON_BV_02_C - PASS
|
|
|
|
|
|
| |
If a profiles disconnects while in connecting state but ext_connect has
already been called the state is never updated since ext_io_disconnected
always calls btd_service_disconnecting_complete.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the profile connection initiated by remote device,
ext_connect() function is triggered without advance the state
of device's service to BTD_SERVICE_STATE_CONNECTING.
This is causing a problems when the later 'NewConnection'
dbus method call is made to registered application. If
the remote device gets disconnected during the period of
time waiting for the reply of 'NewConnection' method, the
btd_service_disconnect() call will fail at the service state
check and never handle the profile disconnection due to that
state was incorrectly left as BTD_SERVICE_STATE_DISCONNECTED.
Fix the problem by use service_accept() call in ext_connect()
to assure the service state has changed. Also modify the logic
of service state check in btd_service_connecting_complete()
to prevent the problem when the 'NewConnect' reply changes
service state to BTD_SERVICE_STATE_CONNECTED while the device
has already disconnected before it arrives.
|
| |
|
|
|
|
| |
This updates PCE record version to 1.2
|
|
|
|
|
|
| |
Without this patch, error will not be returned if remote device does not
support the service and hence application will never get any response
for the connect request
|
| |
|
|
|
|
|
|
|
| |
Add PbapSupportedFeatures(0x0317) to PSE Record.
PTS Test case passed:
TP/SSM/BV-11-C [PSE Shares PbapSupportedFeatures bits].
|
|
|
|
|
|
|
|
|
| |
Add MAP supported features bits to MAS SDP record
as per the MAP 1.2 specs section 7.1.1.
Fix the PTS 5.3 test-cases:
TC_MSE_MFB_BV_02_I
TC_MSE_MFB_BV_05_I
|
|
|
|
| |
Variable rfcomm is never used after assignment
|
|
|
|
| |
rfcomm can only be NULL in this path
|
|
|
|
|
|
|
|
|
|
|
|
| |
This got introduced with PCE that register a record for PBAP client, but
it end up causing a regression where all profiles that have records would
be probed as if server was enabled as well.
Note that is was possible to register PBAP client with PCE record, in
that case Role option should be omitted so both server and client role
are enabled by default which does not affect PBAP server component since
it uses a different UUID, in fact the correct form to add PCE record is
probably to register as server only.
|
| |
|
|
|
|
|
|
| |
For incoming connections it is not mandatory to have a service since the
profile may be a server only (enable_client is false) therefore it does
not need to track connection status.
|
|
|
|
| |
This is necessary to do accurate matching for LE devices.
|
|
|
|
|
| |
This add MapSupportedFeatures and set it to support everything including
instance information and extended event report.
|
|
|
|
|
| |
This remove code related to waiting service to be resolved as it is now
part of btd_request_authorization.
|
| |
|
| |
|
|
|
|
| |
This allows to pass custom SDP flags to sdp_connect.
|
|
|
|
| |
Allow this symbol to be exported and usable from external plugins.
|
|
|
|
| |
Allow this symbol to be exported and usable from external plugins.
|
|
|
|
| |
This fix not updating UUIDs when those services are registered.
|
|
|
|
|
|
| |
To be able to use OBEX over L2CAP the version number should be at least
0x102, in addition to that ERTM mode should be used to comply to
GOEP 2.0.
|
|
|
|
|
| |
Make adapter in charge of updating SDP database. This allow to decouple
SDP of code used for notifying adapters about SDP database change.
|
|
|
|
|
| |
Make adapter in charge of updating SDP database. This allow to decouple
SDP of code used for notifying adapters about SDP database change.
|
| |
|
|
|
|
|
| |
This replaces dbus_connection_send_with_reply with
g_dbus_send_message_with_reply which does not alter message order.
|
| |
|
|
|
|
|
|
|
|
| |
Previously the value of "authorize" was essentially ignored in the
settings table. This wasn't very noticeable since almost all profiles
use the default true value. Since the default value of "authorize" is
true it cannot be left out from the default settings table entries
(leaving it out would set it implicitly to false).
|
|
|
|
|
| |
Some external profiles, FTP and OPP, require a different L2CAP mode such
as ERTM to interoperate properly.
|
|
|
|
|
|
|
| |
After commit 7bd3626b6715ac6a117d56b95b455960f7cf34de, incoming
connections require the service being available from SDP. This is not
always guaranteed because some services might not be listed in SDP (like
MNS).
|
|
|
|
|
| |
When an incoming connection attempt is received, if the corresponding
device or service is not found, handle the error-case.
|