Commits

Commit Message Author Age Changes
bc6ee207 battery: Add Source property to Battery API As Battery API will be generalized for other battery reporting protocols, the Source property is useful for diagnostics purposes. Reviewed-by: Miao-chen Chou <mcchou@chromium.org> Sonny Sasaka 5 years ago 3 files, +34, -6
aa4a2957 profiles/battery: Refactor to use battery library This refactors profiles/battery to use the internal battery library that handles the D-Bus intricacies so that profiles/battery only handles the GATT BAS concerns. Reviewed-by: Daniel Winkler <danielwinkler@google.com> Sonny Sasaka 5 years ago 1 file, +15, -36
88f11c0b battery: Add the internal Battery API This patch adds an API for internal BlueZ code to expose battery information to org.bluez.Battery1 interface. The motivation behind this is that there is going to be other places than GATT BAS handler that exposes battery information, for example internal plugins and the BatteryProvider1 D-Bus API for external clients. Reviewed-by: Daniel Winkler <danielwinkler@google.com> Sonny Sasaka 5 years ago 3 files, +208, -1
43ba14bd a2dp: Fix crash if setup is freed while reconfiguring This fixes the crash reported on: https://github.com/bluez/bluez/issues/60 Luiz Augusto von Dentz 5 years ago 1 file, +22, -5
649a9faf main.conf: use correct key for BREDR configuration Ronan Pigott 5 years ago 1 file, +1, -1
9b6f88b3 lib: Fix the unchecked return value This patch fixes the unchecked return value. Tedd Ho-Jeong An 5 years ago 2 files, +6, -3
4b16d594 profile/bnep: Fix the unchecked return value This patch fixes the unchecked return value. Tedd Ho-Jeong An 5 years ago 1 file, +5, -1
8d230829 emulator: Fix the unchecked return value This patch fixes the unchecked return value. Tedd Ho-Jeong An 5 years ago 2 files, +13, -3
66b360a5 btio: Fix the unchecked return value This patch fixes the unchecked return value. Tedd Ho-Jeong An 5 years ago 1 file, +10, -4
fb95196e monitor: Fix the unchecked return value This patch fixes the unchecked return value. Tedd Ho-Jeong An 5 years ago 2 files, +23, -10
66affa10 monitor: Fix potential memory leak If the mainloop_add_fd() returns with failure, the destroy callback is never called so any reosurces need to be released never freed/closed. This potential leakage is checked with valgrind after failing the mainloop_add_fd() function manually. ==258684== 1,500 bytes in 1 blocks are definitely lost in loss record 3 of 3 ==258684== at 0x483BB1A: calloc (vg_replace_malloc.c:760) ==258684== by 0x123F1A: open_channel (control.c:1058) ==258684== by 0x125B09: control_tracing (control.c:1540) ==258684== by 0x122764: main (main.c:255) ==258684== ==258684== LEAK SUMMARY: ==258684== definitely lost: 1,500 bytes in 1 blocks ==258684== indirectly lost: 0 bytes in 0 blocks ==258684== possibly lost: 0 bytes in 0 blocks ==258684== still reachable: 48 bytes in 2 blocks ==258684== suppressed: 0 bytes in 0 blocks This patch frees/closes the resources if the function returns with failure. Tedd Ho-Jeong An 5 years ago 2 files, +28, -6
d83f1d48 avdtp: Fix not sending GetCapabilities It remote SEP has no codec capabilities it must be read with GetCapabilities/GetAllCapabilities otherwise we cannot match it with a local SEP. Luiz Augusto von Dentz 5 years ago 1 file, +2, -1
326d70ed a2dp: Fix crash when SEP codec has not been initialized If SEP has not been properly discovered avdtp_get_codec may return NULL thus causing crashes such as: https://github.com/bluez/bluez/issues/57 Luiz Augusto von Dentz 5 years ago 1 file, +8, -3
35a2c504 hog: Fix stripping off read report bytes If the HID subsystem requests a HID report to be read from the device, we currently incorrectly strip off the first byte of the response, if the device has report IDs set in the HID report descriptor. This is incorrect; unlike USB HID, the report ID is *not* included in the HOG profile's HID reports, and instead exists out of band in a descriptor on the report's bluetooth characteristic in the device. In this patch, we remove the erroneous stripping of the first byte of the report, and (if report IDs are enabled) prepend the report ID to the front of the result. This makes the HID report returned indentical in format to that of a USB HID report, so that the upper HID drivers can consume HOG device reports in the same way as USB. Dean Camera 5 years ago 1 file, +10, -7
e892dd0c gatt: Fix duplicate free for GATT service includes Objects in the service->includes queue are obtained via dbus_message_iter_get_basic call and according to the contract for the value is that it is returned by the reference and should not be freed thus we should make a copy. This will fix the issue when the GATT service app is disconnected (reproduced with gatt-service included in bluez), bluetoothd is crashing: bluetoothd: src/gatt-database.c:gatt_db_service_removed() Local GATT service removed bluetoothd: src/adapter.c:adapter_service_remove() /org/bluez/hci0 bluetoothd: src/adapter.c:remove_uuid() sending remove uuid command for index 0 bluetoothd: src/sdpd-service.c:remove_record_from_server() Removing record with handle 0x10006 bluetoothd: src/gatt-database.c:proxy_removed_cb() Proxy removed - removing service: /service1 munmap_chunk(): invalid pointer Pavel Maltsev 5 years ago 1 file, +6, -1
00852d31 mesh: Fix regression error in HB subscription set This fixes a regression introduced in commit c77bb848a9fb ("mesh: Refactor heartbeat pub/sub"): Heartbeat subscription should be enabled unless either source or destination are unassigned addresses or period log is zero. Also, decrement ref count on group destination address if period log is zero since the subscription is not supposed to be processed. Inga Stotland 5 years ago 1 file, +10, -5
0addc5c6 test-runner: Move code kill processes created This moves the code that kill processes outside of the loop iteration. Luiz Augusto von Dentz 5 years ago 1 file, +10, -10
7f272742 btdev: Fix not emitting Ext Connection Complete properly le_meta_event must be using when emitting a meta event. Luiz Augusto von Dentz 5 years ago 1 file, +2, -1
0a3cb681 test-runner: Use multidevs=remap when mounting rootfs This avoid inode collisions when the host has multiple fs to be mapped to the rootfs on the guest. Luiz Augusto von Dentz 5 years ago 1 file, +2, -1
3fb1bd85 test-runner: Change qemu output This changes the serial device to include mux=on which enables the output of early kernel logs. Luiz Augusto von Dentz 5 years ago 1 file, +2, -2
d8c4c245 device: Update cache only if content changed This fix hammering storage device (eg sdcard) when doing scanning and LE devices are around. Szymon Janc 5 years ago 1 file, +9, -1
f3bd1908 main.conf: Add option to configure AVDP session/stream channel modes This adds a new group AVDTP where platform can configure the preferred L2CAP channel modes for both session (signalling) and stream (transport). For backward compatibility the both SessionMode and StreamMode defaults to basic mode. Luiz Augusto von Dentz 5 years ago 5 files, +68, -16
b6e37c12 avdtp: Fix connecting using streaming mode with signalling channel Signalling channel shall only use Basic or ERTM modes. Luiz Augusto von Dentz 5 years ago 1 file, +16, -10
b4f1eb03 adv_monitor: Fix remove monitor from the kernel A monitor is removed in the following scenarios: - monitor dbus object removed by the app - monitor removed by the kernel - client app invokes UnregisterMonitor() - client app is killed/disconnected - AdvMonitorManager is destroyed In the first case, we need to remove the corresponding monitor from the kernel and free the bluez monitor object. In the second case, we need to call the Release() method on the corresponding dbus monitor object and free the bluez monitor object. Kernel may remove all monitors and send MGMT_EV_ADV_MONITOR_REMOVED event to bluez. In such case, we need to call Release() method on all monitors from all registered apps, and free the bluez monitor objects. In the third case, we need to call the Release() method on the monitor objects created by the app, remove corresponding monitors from the kernel and then free the bluez monitor object. In the fourth case, since the app is not available, all the dbus monitor objects created by that app are also unavailable. So, we just need to remove corresponding monitors from the kernel and then free the bluez monitor objects. In the fifth case, we need to call Release() method on all monitors from all registered apps, remove corresponding monitors from the kernel and then free the bluez monitor objects. When app exits or gets killed without removing the dbus monitor objects and without invoking the UnregisterMonitor() method, a race condition could happen between app_destroy and monitor_proxy_removed since dbus objects hosted by the app are destroyed on app exit. This patch fixes the first, second and fourth cases ensuring that monitors from the kernel are removed correctly, Release() method is invoked whenever necessary and bluez monitor objects are freed only once. Manish Mandlik 5 years ago 1 file, +130, -81
a4437981 test-runner: Add option to start monitor This adds an option (-m/--monitor) to start btmon before the command running the command/tester which is convenient when a tests results in HCI traffic which are decoded by hciemu as it only prints the hexdump. Luiz Augusto von Dentz 5 years ago 1 file, +87, -5
39dd929f bthost: Fix sending uninitilized data Syscall param writev(vector[...]) points to uninitialised byte(s) at 0x4A8A497: writev (in /usr/lib64/libc-2.31.so) by 0x1365C1: send_packet (bthost.c:509) by 0x1365C1: send_packet (bthost.c:492) by 0x1365C1: next_cmd (bthost.c:737) by 0x137578: evt_cmd_complete (bthost.c:882) by 0x137578: process_evt (bthost.c:1343) by 0x137578: bthost_receive_h4 (bthost.c:2414) by 0x12DF49: receive_bthost.part.0 (hciemu.c:134) by 0x48B978E: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.6400.6) by 0x48B9B17: ??? (in /usr/lib64/libglib-2.0.so.0.6400.6) by 0x48B9E32: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.6400.6) by 0x14A664: mainloop_run (mainloop-glib.c:66) by 0x14AA41: mainloop_run_with_signal (mainloop-notify.c:188) by 0x149A7B: tester_run (tester.c:871) by 0x129C77: main (mgmt-tester.c:10219) Address 0x4c48c05 is 21 bytes inside a block of size 280 alloc'd at 0x483CAE9: calloc (vg_replace_malloc.c:760) by 0x136487: queue_command (bthost.c:472) by 0x136487: send_command (bthost.c:715) by 0x13948A: bthost_set_ext_adv_enable (bthost.c:2581) by 0x12CEBF: trigger_device_found (mgmt-tester.c:8513) by 0x148C9A: wait_callback (tester.c:749) by 0x48BA330: ??? (in /usr/lib64/libglib-2.0.so.0.6400.6) by 0x48B978E: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.6400.6) by 0x48B9B17: ??? (in /usr/lib64/libglib-2.0.so.0.6400.6) by 0x48B9E32: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.6400.6) by 0x14A664: mainloop_run (mainloop-glib.c:66) by 0x14AA41: mainloop_run_with_signal (mainloop-notify.c:188) by 0x149A7B: tester_run (tester.c:871) Luiz Augusto von Dentz 5 years ago 1 file, +1, -0
90cf5bf7 hciemu: Fix crash when test is aborted during pre setup If the tester_pre_setup_failed is called all timeout related to the test must be cancelled as the test should have been freed by the application and the next test is about to start. Luiz Augusto von Dentz 5 years ago 2 files, +12, -1
d3a70532 mgmt-tester: Update expected advertisement flags This updates the expected advertisement flags which now includes MGMT_ADV_FLAG_CAN_SET_TX_POWER and MGMT_ADV_FLAG_HW_OFFLOAD. Luiz Augusto von Dentz 5 years ago 1 file, +2, -2
954e6d9e mgmt-tester: Print unexpected command responses This prints the difference between the command response and the expected command response to make it easier to debug. Luiz Augusto von Dentz 5 years ago 1 file, +3, -0
0653fd53 mgmt-tester: Update supported-features to not include HS High speed has been disabled by default, also since it can be enabled this turn checks of supported-features into warnings to allow it work even if BT_HS has been enabled in the kernel. Luiz Augusto von Dentz 5 years ago 2 files, +99, -98
58e1fba7 shared/tester: Add option to filter by string This adds option to filter by string which does not require to enter the entire prefix. Luiz Augusto von Dentz 5 years ago 1 file, +9, -0
129d729c smp-tester: Fix not registering for MGMT_EV_USER_CONFIRM_REQUEST For client test MGMT_EV_USER_CONFIRM_REQUEST shall be resgistered as well as the kernel has been updated to request user confirmation even when acting as initiator. Luiz Augusto von Dentz 5 years ago 1 file, +4, -0
c7feea25 l2cap-tester: Fix L2CAP LE Server - Success This test was failing due to the kernel now using different values for MPS and credits. Luiz Augusto von Dentz 5 years ago 1 file, +2, -2
02cbe2d2 bthost: Fix running request callbacks for remote requests Ident are only unique per request/response pair so if a remote request is initiated we shall not attempt to run the callback even if the ident matches. Luiz Augusto von Dentz 5 years ago 1 file, +30, -2
92033586 btdev: Rework command handling This create command tables per version/supported command bits to make it easier to keep them in sync. Luiz Augusto von Dentz 5 years ago 1 file, +3834, -3151
0b1247f0 mesh: Only deregister io for the last network detached When multiple mesh networks are active and one is detached using Leave(), the I/O to all networks is halted. This patch prevents that by only deregistering the I/O if all networks have been detached. Michael N. Moran 5 years ago 1 file, +6, -2
11d4823f mesh/mesh-config-json: Fix errors found by static analysis This fixes miscellaneous issues related to unchecked return status and (temporary) allocated memory leaks due to daemon's exit on startup failure. Inga Stotland 5 years ago 1 file, +33, -29
ffdaeed4 mesh: Fix memory leak when failing to load a node This fixes a memory leak that may occur on unsuccessful element initialization from storage. Inga Stotland 5 years ago 1 file, +2, -5
18967009 mesh: Fix memory leak and NULL pointer dereference This fixes a potential NULL pointer dereferencing in mesh_model_pub_set() when virtual address publication cannot be successfully stored. Also, fix a minor memory leak that may occur on unsuccessful model initialization from storage. Inga Stotland 5 years ago 1 file, +5, -3
dac8ef3b mesh: Fix errors found by static analysis This fixes a NULL pointer dereference error (cfgmod-server.c) and miscellaneous issues related to unchecked return status. Inga Stotland 5 years ago 4 files, +58, -41
02e46e9d main: Don't warn for unset config option Unset options shall not be printed if debug is not enabled. Luiz Augusto von Dentz 5 years ago 1 file, +1, -1
c29a438a client: Remove reference to g_steal_pointer() In order to avoid requiring higher version of GLib, replace g_steal_pointer() with explicitly setting the pointer value to NULL. Inga Stotland 5 years ago 1 file, +10, -4
3314bf2d doc/adapter-api: Add InProgess error to StartDiscovery Michael Nosthoff 5 years ago 1 file, +1, -0
a082ac0e Cancel GATT client operations when cleaning up GATT cache A crash is found when discovery_complete_op is invoked but gatt_db_attribute objects have been freed. A solution is to always cancel GATT client operations every time we clean GATT cache. The crash is reproducible by connecting to an LE mouse and then calling RemoveDevice immediately, triggering disconnection while GATT service discovery is in progress. Sample crash stack trace: 0 gatt_db_service_get_handles (service=0x1751130, service=0x1751130, end_handle=0x7ffcd600806e, start_handle=0x7ffcd600806c) at src/shared/gatt-db.c:569 1 gatt_db_attribute_get_service_data (attrib=<optimized out>, start_handle=0x7ffcd600806c, end_handle=0x7ffcd600806e, primary=0x0, uuid=0x0) at src/shared/gatt-db.c:1657 2 0x00000000004983a8 in discovery_op_complete (op=op@entry=0x173b320, success=<optimized out>, err=err@entry=10 '\n') at src/shared/gatt-client.c:406 3 0x000000000049a548 in discover_descs_cb (success=<optimized out>, att_ecode=<optimized out>, result=<optimized out>, user_data=0x173b320) at src/shared/gatt-client.c:915 4 0x00000000004a1d87 in discovery_op_complete (op=0x1748450, success=<optimized out>, ecode=<optimized out>) at src/shared/gatt-helpers.c:615 5 0x00000000004a2379 in discover_descs_cb (opcode=<optimized out>, pdu=0x174d551, length=<optimized out>, user_data=0x1748450) at src/shared/gatt-helpers.c:1465 6 0x00000000004966db in handle_rsp (pdu_len=4, pdu=<optimized out>, opcode=<optimized out>, chan=0x17483c0) at src/shared/att.c:814 7 can_read_data (io=<optimized out>, user_data=0x17483c0) at src/shared/att.c:1011 8 0x00000000004a0853 in watch_callback (channel=<optimized out>, cond=<optimized out>, user_data=<optimized out>) at src/shared/io-glib.c:157 9 0x00007fb3f2d7fe87 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 10 0x00007fb3f2d80230 in ?? () from /usr/lib64/libglib-2.0.so.0 11 0x00007fb3f2d80542 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0 12 0x00000000004a0e25 in mainloop_run () at src/shared/mainloop-glib.c:66 13 0x00000000004a11f2 in mainloop_run_with_signal (func=func@entry=0x43f200 <signal_callback>, user_data=user_data@entry=0x0) at src/shared/mainloop-notify.c:188 14 0x000000000040c72e in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:959 Sonny Sasaka 5 years ago 1 file, +1, -0
f3dd7170 audio/avdtp: Report failure in disconnected state A2DP are relying on the disconnected state callback to do cleanup. If failure occurs when AVDTP are already in the disconnected state, we didn't make any transition state, therefore A2DP would miss this event. This patch allows the transition to disconnected state, even though we are previously already in the disconnected state. Archie Pusaka 5 years ago 1 file, +5, -0
900090ef audio: unref session when failed to setup There is a possibility to miss unref-ing when source/sink fails at setup. Archie Pusaka 5 years ago 2 files, +8, -2
a2315de0 service: add adapter powered check before connecting When policy_connect() is called, there might be a case where the power is just turned off, hence the adapter is down. Add a check in btd_service_connect to detect such condition. Archie Pusaka 5 years ago 1 file, +3, -0
2df57e5e emulator: Return error for ext adv feature not supported This return an error if LE Set Extended Advertising Enable is used with unsupported features. Luiz Augusto von Dentz 5 years ago 1 file, +13, -2
c88050f1 mgmt-tester: Fix failing pairing tests Just-works pairing does request user confirmation. Luiz Augusto von Dentz 5 years ago 1 file, +0, -6
880f5459 mgmt-tester: Don't run tests which command fails This indicates that emulator don't support the test and until proper support is added the test shall not be run. Luiz Augusto von Dentz 5 years ago 1 file, +1, -1
Previous Next