The passed iterator can be NULL as in
gdbus/client.c::properties_changed():
...
proxy->prop_func(..., ..., iter=NULL, ...)
+--client/gatt.c::proxy_property_changed(..., ..., iter, ...);
+--dbus_message_iter_get_arg_type(iter);
...
The passed iterator can be NULL as in
gdbus/client.c::properties_changed():
...
proxy->prop_func(..., ..., iter=NULL, ...)
+--src/advertising.c::properties_changed(..., ..., iter, ...);
+--parse_secondary(iter, ...);
...
It looks like a wrong mask value is used here as only the bits mentioned
in adv_secondary::flag can be set again within the loop.
Replace magic number by preprocessor macro.
If processing failed for a Config Model Subscription Virtual Address
Add/Delete/Overwrite message, the address field in the status reply
should be set to zero. See MshPRFv1.0.1 section 4.4.1.2.8.
These commands and events allow User space apps to test for Mesh
support, and request incoming mesh packets be delivered and request
outbound mesh packets to be sent. This is the basis for sharing
one controller between the legacy bluetoothd daemon and the mesh
bluetooth-meshd daemon.
It is not stated in the mesh profile that the RFU bits in a Model
Publication Set message have to be zero. In fact, PTS test
MESH/NODE/CFG/MP/BV-01-C is sending that command with non-zero RFU and
expects a reply.
This patch adds ioctl-tester which tests the IOCTL commands.
HCI Down
Device List
Device List - Invalid Param 1
Device Info
Reset Stat
Set Link Mode - ACCEPT
Set Link Mode - MASTER
Set Pkt Type - DM
Set Pkt Type - DH
Set Pkt Type - HV
Set Pkt Type - 2-DH
Set Pkt Type - 2-DH
Set Pkt Type - ALL
Set ACL MTU - 1
Set ACL MTU - 2
Set SCO MTU - 1
Set SCO MTU - 2
Block BDADDR - Success
Block BDADDR - Fail
Unblock BDADDR - Success
Unblock BDADDR - Fail
Connection List - No Conn
Connection List
Connection Info
Connection Info - No Connection
Connection Info - Wrong Type
Authentication Info - No Connection
Authentication Info
This fixes the following warnings:
src/shared/gatt-db.c:1339:2: warning: Undefined or garbage value
returned to caller [core.uninitialized.UndefReturn]
return data.num_of_res;
^~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-db.c:725:5: warning: Access to field 'handle' results
in a dereference of a null pointer
service->attributes[0]->handle == handle)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This fixes the following warnings:
src/gatt-database.c:3541:14: warning: Value stored to 'iface' during
its initialization is never read [deadcode.DeadStores]
const char *iface = g_dbus_proxy_get_interface(proxy);
^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/gatt-database.c:3542:14: warning: Value stored to 'path' during
its initialization is never read [deadcode.DeadStores]
const char *path = g_dbus_proxy_get_path(proxy);
^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This property should allow any program to show whether an adapter is in
the process of being turned on.
As turning on an adapter isn't instantaneous, it's important that the UI
reflects the transitional state of the adapter's power, and doesn't
assume the device is already turned on but not yet working, or still off
despite having requested for it to be turned on, in both cases making
the UI feel unresponsive.
This can also not be implemented in front-ends directly as, then,
the status of an adapter wouldn't be reflected correctly in the Settings
window if it's turned on in the system menu. Implementing it in the
front-ends would also preclude from having feedback about the state of
the adapter when bluetoothd is the one powering up the adapter after the
rfkill was unblocked.
See https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/issues/121
and the original https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5773
Instead of only replying to D-Bus requests with an error saying the
adapter is blocked, keep track of the rfkill being enabled or disabled
so we know the rfkill state of the adapter at all times.
This fixes the following warnings:
profiles/audio/media.c:1465:6: warning: 8th function call argument
is an uninitialized value
if (media_endpoint_create(adapter, sender, path, uuid, delay_reporting,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:3012:3: warning: Use of memory after it is freed
release_endpoint(adapter->endpoints->data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/media.c:3015:3: warning: Use of memory after it is freed
media_player_destroy(adapter->players->data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This fixes the following error:
src/shared/shell.c:1135:19: warning: Null pointer passed to 1st
parameter expecting 'nonnull'
data.timeout = atoi(optarg);
^~~~~~~~~~~~
This fixes the following checkpatch warning:
WARNING:LINE_SPACING: Missing a blank line after declarations
216: FILE: client/player.c:625:
+ GDBusProxy *proxy = l->data;
+ print_player(proxy, NULL);
This was found by checkpatch in previous commit:
WARNING:SPACING: Unnecessary space before function pointer arguments
124: FILE: src/shared/bap.h:123:
+ int (*select) (struct bt_bap_pac *lpac, struct bt_bap_pac *rpac,
Do the same for (*config) and (*clear) for consistence.