shared/gatt-client: Fix not marking service as active
Luiz Augusto von Dentz
maintainerPATCH 1/1 shared/gatt-client: Fix not marking service as active
From: Luiz Augusto von Dentz <[email protected]>
If there are no characteristics to discover, or for some reason bt_gatt_discover_descriptors is skiped, the service should be marked as active.
--- src/shared/gatt-client.c | 3 +++ 1 file changed, 3 insertions(+)
src/shared/gatt-client.c +3 -0
@@ -725,6 +725,9 @@ static bool discover_descs(struct discovery_op *op, bool *discovering) goto failed; } +/* Done with the current service */ +gatt_db_service_set_active (op->cur_svc, true); + done:free (chrc_data);return true;
Signature · 1 line
2.37.3
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=704956
---Test result---
Test Summary:
CheckPatch PASS 0.96 seconds GitLint PASS 0.34 seconds BuildEll PASS 27.88 seconds BluezMake PASS 1028.74 seconds MakeCheck PASS 12.10 seconds MakeDistcheck PASS 148.82 seconds CheckValgrind PASS 244.36 seconds bluezmakeextell PASS 96.25 seconds IncrementalBuild PASS 843.96 seconds ScanBuild WARNING 1042.66 seconds
Details
##############################
Test: ScanBuild - WARNING
Desc: Run Scan Build
Output:src/shared/gatt-client.c:387:21: warning: Use of memory after it is freed
gatt_db_unregister(op->client->db, op->db_id);
^~~~~~~~~~
src/shared/gatt-client.c:600:2: warning: Use of memory after it is freed
discovery_op_complete(op, false, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:903:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1012:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1204:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1269:2: warning: Use of memory after it is freed
discovery_op_complete(op, success, att_ecode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1540:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1545:2: warning: Use of memory after it is freed
discover_all(op);
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2047:6: warning: Use of memory after it is freed
if (read_db_hash(op)) {
^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2055:8: warning: Use of memory after it is freed
discovery_op_ref(op),
^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3138:2: warning: Use of memory after it is freed
complete_write_long_op(req, success, 0, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3160:2: warning: Use of memory after it is freed
request_unref(req);
^~~~~~~~~~~~~~~~~~12 warnings generated.
---
Regards,
Linux Bluetooth