summaryrefslogtreecommitdiff
path: root/tools/hcitool.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2015-01-12 17:19:38 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2015-01-14 13:05:40 +0200
commit91865a99749fbb2fbf84b645bc0cda09e22cf046 (patch)
tree9a97764041f97b038336b7939fb2a241b367c872 /tools/hcitool.c
parent5cc9301e09d61473403022121532b1c250a28c35 (diff)
downloadbluez-91865a99749fbb2fbf84b645bc0cda09e22cf046.tar.gz
tools/hcitool: Fix support for simple lecup format
This allow to call lecup in simple form: "hcitool lecup <handle> <min> <max> <latency> <timeout>".
Diffstat (limited to 'tools/hcitool.c')
-rw-r--r--tools/hcitool.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c
index cbd32f3f8..612e5bcf8 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -3308,6 +3308,7 @@ static void cmd_lecup(int dev_id, int argc, char **argv)
{
uint16_t handle = 0, min, max, latency, timeout;
int opt, dd, base;
+ int options = 0;
/* Aleatory valid values */
min = 0x0C8;
@@ -3341,6 +3342,18 @@ static void cmd_lecup(int dev_id, int argc, char **argv)
printf("%s", lecup_help);
return;
}
+
+ options = 1;
+ }
+
+ if (options == 0) {
+ helper_arg(5, 5, &argc, &argv, lecup_help);
+
+ handle = strtoul(argv[0], NULL, 0);
+ min = strtoul(argv[1], NULL, 0);
+ max = strtoul(argv[2], NULL, 0);
+ latency = strtoul(argv[3], NULL, 0);
+ timeout = strtoul(argv[4], NULL, 0);
}
if (handle == 0) {