From 06d73a43a854aee75ff94a82dbbf30ac2c020622 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 21 Jul 2025 14:45:50 -0400 Subject: [PATCH] client: Fix gatt.{read, write} not working on scripts 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(+) diff --git a/client/gatt.c b/client/gatt.c index b18186518..6dc80e2a3 100644 --- a/client/gatt.c +++ b/client/gatt.c @@ -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) -- 2.47.3