[PATCH] tools: btmgmt: Fix return value to return request id

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

 



From: Timo Mueller <timo.mueller@xxxxxxxxxxxx>

Commit 947a7477d2a2ab6a61e5a7de44fd5b7cd2ab8d9c introduced the method
send_cmd which returned the index of the adapter instead of the
request id. As a result no mgmt command could be sent to hci0, as 0
marks an invalid request id.
---
 tools/btmgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 4650876..4c6665e 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -833,7 +833,7 @@ static unsigned int send_cmd(struct mgmt *mgmt, uint16_t op, uint16_t id,
 	if (send_id == 0)
 		g_free(data);
 
-	return id;
+	return send_id;
 }
 
 static void setting_rsp(uint16_t op, uint16_t id, uint8_t status, uint16_t len,
-- 
1.7.11.7

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