diff mbox series

[BlueZ] gatt: added missing disconn_id's and removed extra check

Message ID 20211012215151.15772-1-bernie@allthenticate.net (mailing list archive)
State Accepted
Delegated to: Luiz Von Dentz
Headers show
Series [BlueZ] gatt: added missing disconn_id's and removed extra check | expand

Checks

Context Check Description
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint fail [BlueZ] gatt: added missing disconn_id's and removed extra check 7: B2 Line has trailing whitespace: "is gone at the start of write_reply_cb. "
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS

Commit Message

Bernie Conrad Oct. 12, 2021, 9:51 p.m. UTC
From: Bernie Conrad <bernie@allthenticate.com>

Adds missing assignment to disconn_id for pending operations and removes
check that is already handled by checking if the owner_queue of the op
is gone at the start of write_reply_cb. 

---
 src/gatt-database.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

bluez.test.bot@gmail.com Oct. 12, 2021, 10:35 p.m. UTC | #1
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=562169

---Test result---

Test Summary:
CheckPatch                    PASS      1.65 seconds
GitLint                       FAIL      0.92 seconds
Prep - Setup ELL              PASS      41.66 seconds
Build - Prep                  PASS      0.47 seconds
Build - Configure             PASS      7.42 seconds
Build - Make                  PASS      172.66 seconds
Make Check                    PASS      9.43 seconds
Make Distcheck                PASS      207.02 seconds
Build w/ext ELL - Configure   PASS      7.64 seconds
Build w/ext ELL - Make        PASS      163.95 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint with rule in .gitlint
Output:
[BlueZ] gatt: added missing disconn_id's and removed extra check
7: B2 Line has trailing whitespace: "is gone at the start of write_reply_cb. "




---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/gatt-database.c b/src/gatt-database.c
index 475e7873c..dbe9415a3 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -978,7 +978,7 @@  static struct pending_op *pending_ccc_new(struct bt_att *att,
 	op->attrib = attrib;
 	op->link_type = link_type;
 
-	bt_att_register_disconnect(att,
+	op->disconn_id = bt_att_register_disconnect(att,
 				   pending_disconnect_cb,
 				   op,
 				   NULL);
@@ -2387,9 +2387,7 @@  static void write_reply_cb(DBusMessage *message, void *user_data)
 	}
 
 done:
-	/* Make sure that only reply if the device is connected */
-	if (!bt_att_get_fd(op->att))
-		gatt_db_attribute_write_result(op->attrib, op->id, ecode);
+	gatt_db_attribute_write_result(op->attrib, op->id, ecode);
 }
 
 static struct pending_op *pending_write_new(struct bt_att *att,
@@ -2418,7 +2416,7 @@  static struct pending_op *pending_write_new(struct bt_att *att,
 	op->prep_authorize = prep_authorize;
 	queue_push_tail(owner_queue, op);
 
-	bt_att_register_disconnect(att,
+	op->disconn_id = bt_att_register_disconnect(att,
 			    pending_disconnect_cb,
 			    op, NULL);