From 8f84a47e8d41f88ecf6f4ffb4e450a81c27ae1e6 Mon Sep 17 00:00:00 2001 From: Eder Ruiz Maria Date: Tue, 2 Apr 2013 19:31:19 -0400 Subject: [PATCH] gatttool: Remote address is mandatory for non-interactive gatttool 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 29e326187..1dd0c354c 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) { -- 2.47.3