[PATCH BlueZ v2 02/13] gatttool: Remote address is mandatory for non-interactive gatttool

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

 



From: Eder Ruiz Maria <eder.ruiz@xxxxxxxxxxxxx>

For gatttool non-interactive mode, command line parameter with
bluetooth remote address is mandatory.
---
 attrib/gatttool.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 29e3261..1dd0c35 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c
@@ -603,6 +603,12 @@ int main(int argc, char *argv[])
 		goto done;
 	}
 
+	if (opt_dst == NULL) {
+		g_print("Remote Bluetooth address required\n");
+		got_error = TRUE;
+		goto done;
+	}
+
 	chan = gatt_connect(opt_src, opt_dst, opt_dst_type, opt_sec_level,
 					opt_psm, opt_mtu, connect_cb);
 	if (chan == NULL) {
-- 
1.7.9.5

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