[PATCH BlueZ 4/7] tools/btgatt-client: Fix off-by-one error.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes an error in write-long-value command that caused an
extra invalid byte to get sent at the end of the long write value.
---
 tools/btgatt-client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
index e7cd31c..ea9acb7 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -709,7 +709,7 @@ static void cmd_write_long_value(struct client *cli, char *cmd_str)
 		return;
 	}
 
-	length = argc - 1;
+	length = argc - 2;
 
 	if (length > 0) {
 		if (length > UINT16_MAX) {
-- 
2.1.0.rc2.206.gedb03e5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux