| 4d629a96 |
alert: Introduce manager abstraction layer
This abstraction layer makes the GATT Phone Alert Status and Alert
Notification implementation consistent with other GATT profiles. |
Anderson Lizardo |
13 years ago |
4 files, +71, -4 |
| bbaccd71 |
doc: Introduce Alert API
This API will be implemented and initially used by Phone Alert Status
and Alert Notification GATT profiles (server role). |
Anderson Lizardo |
13 years ago |
2 files, +110, -1 |
| 61219c26 |
core: Fix return value for external profile SDP function |
Johan Hedberg |
13 years ago |
1 file, +3, -5 |
| 9d56eaa6 |
core: Fix using correct address values for profile connecting |
Johan Hedberg |
13 years ago |
1 file, +4, -4 |
| 6d0f4da7 |
core: Add specific error to profile connect log |
Johan Hedberg |
13 years ago |
1 file, +2, -1 |
| c1a11f84 |
core: Add SDP resolving callback for external profiles |
Johan Hedberg |
13 years ago |
1 file, +74, -1 |
| 3ad5d85d |
core: Add skeleton for initiating remote profile connections |
Johan Hedberg |
13 years ago |
1 file, +119, -28 |
| 6ac19993 |
AVRCP: Fix not freeing session list on exit
96 (16 direct, 80 indirect) bytes in 1 blocks are definitely lost in loss record 261 of 338
at 0x4A0884D: malloc (vg_replace_malloc.c:263)
by 0x4C803FE: g_malloc (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C94801: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C95B42: g_slist_append (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x12FDAD: state_changed (avrcp.c:1401)
by 0x12D3B1: avctp_set_state (avctp.c:406)
by 0x12E5C4: avctp_confirm_cb (avctp.c:896)
by 0x1607D3: server_cb (btio.c:254)
by 0x4C7A824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7AB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7AF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x120EB1: main (main.c:551) |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -0 |
| 222cbfa1 |
AVRCP: Fix not freeing player session list on exit
16 bytes in 1 blocks are definitely lost in loss record 111 of 359
at 0x4A0884D: malloc (vg_replace_malloc.c:263)
by 0x4C8026E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C94671: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C959B2: g_slist_append (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x130FCC: avrcp_register_player (avrcp.c:1584)
by 0x13FA1F: register_player (media.c:1689)
by 0x123100: process_message.isra.0 (object.c:197)
by 0x4F70684: ??? (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x4F6290C: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x121747: message_dispatch (mainloop.c:76)
by 0x4C7B22A: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7A694: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4) |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -0 |
| 843a9745 |
AVRCP: Fix not removing session from player upon disconnect
Invalid read of size 8
at 0x1310E3: avrcp_unregister_player (avrcp.c:1604)
by 0x13EB57: path_free (media.c:1834)
by 0x123208: remove_interface.isra.1 (object.c:558)
by 0x1238DD: g_dbus_unregister_interface (object.c:705)
by 0x124BB8: media_server_remove (manager.c:1077)
by 0x4E91C5C: g_slist_foreach (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x17B349: adapter_remove (adapter.c:2309)
by 0x176F39: manager_cleanup (manager.c:290)
by 0x120E65: main (main.c:555)
Address 0x6685058 is 24 bytes inside a block of size 80 free'd
at 0x4C279AE: free (vg_replace_malloc.c:427)
by 0x4E7C50E: g_free (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x12FC97: state_changed (avrcp.c:1380)
by 0x12D351: avctp_set_state (avctp.c:396)
by 0x12D7B4: session_cb (avctp.c:601)
by 0x4E76824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4E76B57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4E76F51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x120E51: main (main.c:551) |
Luiz Augusto von Dentz |
13 years ago |
1 file, +5, -0 |
| e4bf2b16 |
gdbus: Fix not freeing list node by using g_slist_delete_link
g_slist_remove_link does not free the node which can cause leaks so
replace that with g_slist_delete_link which does free memory properly. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -1 |
| 9a4318f6 |
core: Fix freeing external profile record
The add_record_to_server function takes ownership of the service record
so it only needs to be freed if the function fails. |
Johan Hedberg |
13 years ago |
1 file, +2, -6 |
| dd24ef7d |
core: Suspend scanning before connect on pairing
If there is a disconnected bonded device there will be a scanning
procedure active due to the General Connection Establishment Procedure.
This scan have to be suspended before trying to connect to the remote
device for pairing. |
João Paulo Rechi Vita |
13 years ago |
1 file, +74, -65 |
| 94db1e87 |
mgmt: Add address type to bonding debug message |
João Paulo Rechi Vita |
13 years ago |
1 file, +2, -1 |
| c60d08b3 |
core: Re-connect for ECONNRESET or ECONNABORTED
This patch keeps scanning and re-connections active if the disconnection
reason is ECONNRESET(Remote Initiated Disconnection).
Re-connection is a behaviour determined by Profiles or by the upper
layer(user actions). For instance, HoG requires re-connection always
active, no matter if the previous disconnection reason was page timeout
or remote initiated disconnection (ECONNRESET). Some devices disconnects
after some idle time, connectable advertises are sent by the peripheral
when commanded by the user(eg: key pressed). Disconnection can be also
triggered by the local host (ECONNABORTED) using command line tools or
Disconnect method in the Device interface.
The peripheral dictates the re-connection controlling the connectable
advertises, BlueZ(central) needs to keep the scanning always active to
able to detect the advertises and trigger the connection. |
Claudio Takahasi |
13 years ago |
1 file, +10, -2 |
| 670354f2 |
core: Disable unnecessary auto connections
BlueZ host disconnects the link when encryption fails. ECONNABORTED
error is returned by the kernel when the connection is terminated by the
local host. This scenario commonly happens when authentication fails due
PIN or Key Missing. |
Paulo Alcantara |
13 years ago |
1 file, +3, -0 |
| 0504220d |
core: Start LE scanning when a device requests
This patch enables the LE scanning when a device requires connection and
there isn't discovery sessions, triggering the General Connection
Establishment Procedure. |
Claudio Takahasi |
13 years ago |
1 file, +52, -16 |
| 4c8c1fa8 |
core: Replace interleaved by LE scanning
This patches replaces the interleaved discovery by LE scanning when LE
re-connection is required. |
Claudio Takahasi |
13 years ago |
1 file, +15, -7 |
| 0573c903 |
mgmt: Add LE scanning callback
This patch adds a new callback to allow the adapter to control LE
scanning. The current approach uses the active scanning with default
windows and intervals defined by the core spec without any filtering. |
Claudio Takahasi |
13 years ago |
2 files, +35, -0 |
| 683ad756 |
core: Mutually exclude concurrent connections
Since controllers don't support more than one ongoing connection
procedure at the same time, new connection attempts needs to yield if
there is an ongoing connection procedure already. |
João Paulo Rechi Vita |
13 years ago |
3 files, +62, -12 |
| 773b25a9 |
audio: Fix missing gateway state check on Connect
If the gateway is already connected (or connecting) when Connect() is
called, an error should be returned, exactly as other interfaces do. |
Mikel Astiz |
13 years ago |
1 file, +5, -0 |
| fa14609c |
attrib: Get address type using gatt_get_address()
This avoids a separate call to device_get_addr_type(). |
Anderson Lizardo |
13 years ago |
1 file, +1, -4 |
| 27316edb |
core: Add support for ServiceRecord option for exteral profiles |
Johan Hedberg |
13 years ago |
1 file, +51, -0 |
| 391831ac |
core: Move sdp_xml_parse_record from service plugin to sdp-xml.c |
Johan Hedberg |
13 years ago |
4 files, +212, -204 |
| 0f4625cb |
device: Remove not used variables from search_cb
sda and dba are not used in function code. |
Szymon Janc |
13 years ago |
1 file, +1, -7 |
| 79e7db12 |
core: Add variables to track client/server enabling for external profiles |
Johan Hedberg |
13 years ago |
1 file, +26, -13 |
| ac2b9b3e |
core: Support friendly names in profile registration |
Johan Hedberg |
13 years ago |
1 file, +5, -1 |
| ff3e9f44 |
core: Use proper defines for SPP profile detection |
Johan Hedberg |
13 years ago |
1 file, +4, -2 |
| e537b399 |
core: Add missing profile "friendly names" to glib-helper.c |
Johan Hedberg |
13 years ago |
1 file, +9, -0 |
| 64bf69dc |
lib: Add SPP UUID define |
Johan Hedberg |
13 years ago |
1 file, +2, -0 |
| a5ee8819 |
lib: Add some missing svclass values |
Johan Hedberg |
13 years ago |
1 file, +5, -0 |
| 3a90fb0f |
agent: Remote not used variables from pincode_reply
adapter and sba are not used later in function code. |
Szymon Janc |
13 years ago |
1 file, +0, -4 |
| 239a6dcd |
service: Remove extra memory copying from cancel_authorization
src is never read before being overwritten few lines below. |
Szymon Janc |
13 years ago |
1 file, +0, -5 |
| 91cc1422 |
audio: Fix crash on gateway close while connected
RFCOMM and SCO watches need to be removed in gateway_close(), otherwise
the watch callbacks might get called later on, resulting in a second
call to gateway_close().
The issue can be easily reproduced if a device is removed (unpaired) a
device while HFP gateway is connected:
bluetoothd[26579]: audio/gateway.c:path_unregister() Unregistered interface org.bluez.HandsfreeGateway on path /org/bluez/26579/hci0/dev_90_84_0D_B2_C7_04
bluetoothd[26579]: audio/media.c:gateway_state_changed()
bluetoothd[26579]: audio/media.c:gateway_state_changed() Clear endpoint 0x555555822cb0
bluetoothd[26579]: audio/source.c:path_unregister() Unregistered interface org.bluez.AudioSource on path /org/bluez/26579/hci0/dev_90_84_0D_B2_C7_04
bluetoothd[26579]: audio/avdtp.c:avdtp_unref() 0x555555827980: ref=2
bluetoothd[26579]: src/device.c:btd_device_unref() 0x55555581a470: ref=1
bluetoothd[26579]: src/device.c:btd_device_unref() 0x55555581a470: ref=0
bluetoothd[26579]: src/device.c:device_free() 0x55555581a470
Program received signal SIGSEGV, Segmentation fault.
gateway_close (device=0x555555820390) at audio/gateway.c:585
585 if (gw->rfcomm) { |
Mikel Astiz |
13 years ago |
1 file, +27, -6 |
| c8f45448 |
audio: Fix crash if gateway closed before reply
Any pending call to the agent needs to be cancelled in gateway_close(),
to make sure newconnection_reply() never gets called.
Otherwise, the audio gateway can be closed (dev->gateway == NULL) before
the reply from the agent has been received, resulting in the following
crash as reproduced while removing (unpairing) a device:
bluetoothd[2219]: src/mgmt.c:mgmt_unpair_device() index 0 addr 38:16:D1:C5:D1:A2
bluetoothd[2219]: audio/gateway.c:path_unregister() Unregistered interface org.bluez.HandsfreeGateway on path /org/bluez/2219/hci0/dev_38_16_D1_C5_D1_A2
bluetoothd[2219]: audio/media.c:gateway_state_changed()
bluetoothd[2219]: audio/media.c:gateway_state_changed() Clear endpoint 0x555555820640
bluetoothd[2219]: audio/source.c:path_unregister() Unregistered interface org.bluez.AudioSource on path /org/bluez/2219/hci0/dev_38_16_D1_C5_D1_A2
bluetoothd[2219]: src/device.c:btd_device_unref() 0x555555833e70: ref=1
bluetoothd[2219]: src/adapter.c:adapter_get_device() 38:16:D1:C5:D1:A2
bluetoothd[2219]: src/adapter.c:adapter_create_device() 38:16:D1:C5:D1:A2
bluetoothd[2219]: src/device.c:device_create() Creating device /org/bluez/2219/hci0/dev_38_16_D1_C5_D1_A2
bluetoothd[2219]: src/device.c:device_free() 0x55555581f9c0
bluetoothd[2219]: Unable to get btd_device object for 38:16:D1:C5:D1:A2
bluetoothd[2219]: src/device.c:btd_device_unref() 0x555555833e70: ref=0
bluetoothd[2219]: src/device.c:device_free() 0x555555833e70
bluetoothd[2219]: src/mgmt.c:mgmt_event() cond 1
bluetoothd[2219]: src/mgmt.c:mgmt_event() Received 16 bytes from management socket
bluetoothd[2219]: src/mgmt.c:mgmt_cmd_complete()
bluetoothd[2219]: src/mgmt.c:mgmt_cmd_complete() unpair_device complete
Program received signal SIGSEGV, Segmentation fault.
0x000055555556fa26 in newconnection_reply (call=<optimized out>, data=0x555555824dd0) at audio/gateway.c:285
285 if (!dev->gateway->rfcomm) {
Additionally, this patch makes it unnecessary to check if RFCOMM got
disconnected before newconnection_reply, since RFCOMM disconnection also
triggers gateway_close() and thus the agent's call will be cancelled. |
Mikel Astiz |
13 years ago |
1 file, +27, -8 |
| 293706b8 |
audio: Drop audio-specific authorization mechanism
Remove the audio-specific service authorization mechanism in favor of
using the conventional one.
The main difference is that audio profiles will be authorized
independently. Therefore a single connection might result in several
profile authorization requests to the agent (i.e. HFP, A2DP and AVRCP).
This removes any internal policy that would skip the authorization
procedure, making it simpler and more convenient for IVI use-cases.
Agents interested in simulating the old behavior are encouraged to
either set the device as trusted or just reply to the additional
authorization requests automatically without user intervention. |
Mikel Astiz |
13 years ago |
5 files, +43, -196 |
| 0314008f |
adapter: Queue parallel authorization requests
Remote device could try to connect several profiles in parallel, or
several devices could be trying to connect services. Instead of
returning EBUSY, this patch adds a queue to each adapter such that the
authorization requests will be queued and processed sequentially. |
Mikel Astiz |
13 years ago |
1 file, +103, -78 |
| 5381d021 |
adapter: Use authorization id for cancelling
Return a request id in btd_request_authorization() in order to be used
when the request needs to be cancelled. This id alone will be enough to
use btd_cancel_authorization(). |
Mikel Astiz |
13 years ago |
8 files, +87, -76 |
| 127d871e |
adapter: Replace device authorizing flag
Refactor code to drop the device authorizing flag by replacing it with a
private authorization pointer in btd_adapter. After all, no more than
one authorization can be ongoing, so the code is easier to follow if
this is made explicit. |
Mikel Astiz |
13 years ago |
3 files, +37, -32 |
| 4c8a8d65 |
build: Update glib dependency to 2.32
This version of the library adds several convenient features such as
g_queue_free_full. |
Mikel Astiz |
13 years ago |
1 file, +2, -2 |
| 7ab85649 |
core: Add skeleton for connecting external profiles |
Johan Hedberg |
13 years ago |
1 file, +133, -9 |
| 953e7b09 |
core: Fix profile cleanup when removing or disconnecting |
Johan Hedberg |
13 years ago |
1 file, +23, -0 |
| 14460ad7 |
core: Add btd_profile parameter to profile disconnect callback |
Johan Hedberg |
13 years ago |
1 file, +3, -1 |
| f59b07e3 |
core: Add proper adapter_remove callback for external profiles |
Johan Hedberg |
13 years ago |
1 file, +28, -0 |
| 842c3dfa |
core: Track probed adapters for profiles |
Johan Hedberg |
13 years ago |
1 file, +6, -0 |
| 3d0e48b3 |
gatt: Remove offset parameter from gatt_read_char
The Core spec allows to implement Read Long Characteristic Value as a
Read Request, followed by zero or more Read Blob Requests, therefore the
offset parameter is unnecessary and is always 0 for normal use. |
Jefferson Delfes |
13 years ago |
10 files, +29, -51 |
| 5e1174fb |
gatt: Add reading stored Service Changed handle
This patch avoids discovering Service Changed handle when the ATT
connection is established and there is a previous stored handle. |
Claudio Takahasi |
13 years ago |
1 file, +36, -0 |
| 9be48fd3 |
gatt: Add storing Service Changed handle
This patch stores the Service Changed control-point handle in order to
be able to listen for Service Changed indications when the connection
is established. |
Claudio Takahasi |
13 years ago |
1 file, +42, -0 |
| 3140ddd6 |
gatt: Ignore Service Changed if not bonded
This patch fix replying for Service Changed indication when the device
is not bonded. From Erratum 3951: Indications caused by changes to the
Service Changed Characteristic Value shall be considered lost if the
client has not enabled indications the Client Configuration
Characteristic Descriptor. |
Claudio Takahasi |
13 years ago |
1 file, +5, -0 |
| b54b7e53 |
gatt: Remove unneeded handle range check
Since the Service Changed is a read-only control point, it not necessary
to compare the previous value read. This logic was added to compare the
result of the read operation with the received indications. Repeated
indications containing the same range is a valid procedure. |
Claudio Takahasi |
13 years ago |
1 file, +0, -7 |