Skip to content

Commit

Permalink
tools/btgatt-client: Rename sec_level to security
Browse files Browse the repository at this point in the history
  • Loading branch information
Vudentz committed Apr 29, 2015
1 parent 91731d0 commit 8c2fac4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/btgatt-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,15 +1195,15 @@ static void cmd_unregister_notify(struct client *cli, char *cmd_str)
printf("Unregistered notify handler with id: %u\n", id);
}

static void set_sec_level_usage(void)
static void set_security_usage(void)
{
printf("Usage: set_sec_level <level>\n"
printf("Usage: set_security <level>\n"
"level: 1-3\n"
"e.g.:\n"
"\tset-sec-level 2\n");
}

static void cmd_set_sec_level(struct client *cli, char *cmd_str)
static void cmd_set_security(struct client *cli, char *cmd_str)
{
char *argvbuf[1];
char **argv = argvbuf;
Expand All @@ -1218,12 +1218,12 @@ static void cmd_set_sec_level(struct client *cli, char *cmd_str)

if (!parse_args(cmd_str, 1, argv, &argc)) {
printf("Too many arguments\n");
set_sec_level_usage();
set_security_usage();
return;
}

if (argc < 1) {
set_sec_level_usage();
set_security_usage();
return;
}

Expand All @@ -1239,7 +1239,7 @@ static void cmd_set_sec_level(struct client *cli, char *cmd_str)
printf("Setting security level %d success\n", level);
}

static void cmd_get_sec_level(struct client *cli, char *cmd_str)
static void cmd_get_security(struct client *cli, char *cmd_str)
{
int level;

Expand Down Expand Up @@ -1342,9 +1342,9 @@ static struct {
"\tSubscribe to not/ind from a characteristic" },
{ "unregister-notify", cmd_unregister_notify,
"Unregister a not/ind session"},
{ "set-sec-level", cmd_set_sec_level,
{ "set-security", cmd_set_security,
"\tSet security level on le connection"},
{ "get-sec-level", cmd_get_sec_level,
{ "get-security", cmd_get_security,
"\tGet security level on le connection"},
{ "set-sign-key", cmd_set_sign_key,
"\tSet signing key for signed write command"},
Expand Down

0 comments on commit 8c2fac4

Please sign in to comment.