[bluez/bluez] 04cd5d: btdev: Fix scan-build warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Branch: refs/heads/master
  Home:   https://github.com/bluez/bluez
  Commit: 04cd5d2a97c887938ff53b621a4a4a6cc7eec967
      https://github.com/bluez/bluez/commit/04cd5d2a97c887938ff53b621a4a4a6cc7eec967
  Author: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M emulator/btdev.c

  Log Message:
  -----------
  btdev: Fix scan-build warnings

This fixes the following scan-build warnings:

emulator/btdev.c:1126:10: warning: Although the value stored to 'conn' is used in the enclosing expression, the value is never actually read from 'conn' [deadcode.DeadStores]
 1126 |         while ((conn = queue_find(dev->conns, match_handle,
      |                 ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1127 |                                         UINT_TO_PTR(handle))))
      |                                         ~~~~~~~~~~~~~~~~~~~~
emulator/btdev.c:1413:24: warning: Access to field 'link' results in a dereference of a null pointer (loaded from variable 'conn') [core.NullDereference]
 1413 |         pending_conn_del(dev, conn->link->dev);
      |                               ^~~~~~~~~~
emulator/btdev.c:1535:13: warning: Access to field 'dev' results in a dereference of a null pointer (loaded from variable 'conn') [core.NullDereference]
 1535 |         send_event(conn->dev, BT_HCI_EVT_AUTH_COMPLETE, &ev, sizeof(ev));
      |                    ^~~~~~~~~


  Commit: a22935f9baf507788b438e1e704f735de07fd392
      https://github.com/bluez/bluez/commit/a22935f9baf507788b438e1e704f735de07fd392
  Author: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M doc/org.bluez.Device.rst

  Log Message:
  -----------
  org.bluez.Device: Introduced PreferredBearer

This introduces PreferredBearer property which can be used to indicate
what bearer shall be connected first rather than just using last seen
bearer which may not work always since it seems some devices sometimes
advertises on LE bearer but expects connections over BR/EDR e.g:

https://github.com/bluez/bluez/issues/1092

Also with the introduction of LE Audio this might become even more of a
problem since most likely users would like to select which bearer to use
rather than using the last-seen policy.


  Commit: 03240630b39bc777a66babf6737b26a8dc51c0ab
      https://github.com/bluez/bluez/commit/03240630b39bc777a66babf6737b26a8dc51c0ab
  Author: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M src/device.c

  Log Message:
  -----------
  device: Add implementation of PreferredBearer

This adds initial implementation of PreferredBearer.


  Commit: f2e7c8f9960094622044197f99e0dc5599fea896
      https://github.com/bluez/bluez/commit/f2e7c8f9960094622044197f99e0dc5599fea896
  Author: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M client/bluetoothctl.rst
    M client/main.c

  Log Message:
  -----------
  client: Add support get/set PreferredBearer

This adds support for PreferredBearer which is printed with the likes of
info command:

bluetoothctl> info <addr>
...
	PreferredBearer: last-seen

It also introduces a new command to get/set the PreferredBearer:

[bluetoothctl]> bearer --help
Get/Set preferred bearer
Usage:
	 bearer <dev> [last-seen/bredr/le]

[bluetoothctl]> bearer <addr>
	PreferredBearer: last-seen
[bluetoothctl]> bearer <addr> le
bluetoothd: @ MGMT Command: Add Device (0x0033) plen 8
        LE Address: <addr>
        Action: Auto-connect remote device (0x02)
[CHG] Device <addr> PreferredBearer: le
Changing le succeeded
[bluetoothctl]> bearer <addr>
	PreferredBearer: le
[bluetoothctl]> bearer <addr> bredr
bluetoothd: @ MGMT Command: Remove Device (0x0034) plen 7
        LE Address: <addr>
[CHG] Device <addr> PreferredBearer: bredr
Changing bredr succeeded


  Commit: 4d3c721ee037bcc9553bc2e6a8b7fe0bebb3b50c
      https://github.com/bluez/bluez/commit/4d3c721ee037bcc9553bc2e6a8b7fe0bebb3b50c
  Author: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M doc/settings-storage.txt
    M src/device.c

  Log Message:
  -----------
  storage: Add support for storing PreferredBearer

This adds support for storing PreferredBearer into device info file.


Compare: https://github.com/bluez/bluez/compare/26bc1c9cd9df...4d3c721ee037

To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux