Skip to contentSkip to conversation

client: Fix gatt.{read, write} not working on scripts

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Jul 21, 2025 – Jul 23, 2025 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 client: Fix gatt.{read, write} not working on scripts

From: Luiz Augusto von Dentz <[email protected]>

If gatt.{read, write} are called within a script they don't indicate completion so they block commands to be run after them.

---
 client/gatt.c | 4 ++++
 1 file changed, 4 insertions(+)
client/gatt.c +4 -0
index b18186518953..6dc80e2a31cd 100644
@@ -696,6 +696,8 @@ void gatt_read_local_attribute(char *data, int argc, char *argv[])
 		bt_shell_hexdump(&d->value[offset], d->value_len - offset);
 		return bt_shell_noninteractive_quit(EXIT_SUCCESS);
 	}
+
+	return bt_shell_noninteractive_quit(EXIT_FAILURE);
 }
 
 static uint8_t *str2bytearray(char *arg, size_t *val_len)
@@ -809,6 +811,8 @@ void gatt_write_local_attribute(char *data, int argc, char *argv[])
 	}
 
 	free(value);
+
+	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
 }
 
 static char *attribute_generator(const char *text, int state, GList *source)
Signature · 1 line
2.50.1
#1 lore raw

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=984445

---Test result---

Test Summary:

CheckPatch                    PENDING   0.29 seconds
GitLint                       PENDING   0.27 seconds
BuildEll                      PASS      20.49 seconds
BluezMake                     PASS      2636.17 seconds
MakeCheck                     PASS      20.59 seconds
MakeDistcheck                 PASS      189.93 seconds
CheckValgrind                 PASS      242.87 seconds
CheckSmatch                   PASS      315.63 seconds
bluezmakeextell               PASS      131.75 seconds
IncrementalBuild              PENDING   0.27 seconds
ScanBuild                     PASS      926.47 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Luiz Augusto von Dentz
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 7 lines · On Mon, 21 Jul 2025 16:09:33 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

If gatt.{read, write} are called within a script they don't indicate completion so they block commands to be run after them.

---
 client/gatt.c | 4 ++++
 1 file changed, 4 insertions(+)

Here is the summary with links:
- [BlueZ,v1] client: Fix gatt.{read, write} not working on scripts

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=06d73a43a854

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html