Re: [PATCH 5/7] Add transport option to interactive gatttool

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

 



On Fri, Jan 21, 2011 at 9:46 AM, Sheldon Demario
<sheldon.demario@xxxxxxxxxxxxx> wrote:
> ---
>  attrib/igatttool.c |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/attrib/igatttool.c b/attrib/igatttool.c
> index 29290ed..e0d8b44 100644
> --- a/attrib/igatttool.c
> +++ b/attrib/igatttool.c
> @@ -137,6 +137,23 @@ static void cmd_exit(char **cmd)
>        g_main_loop_quit(main_loop);
>  }
>
> +static void cmd_transport(char **cmd)

You can call this parameter "opt" for consistency with other commands.

> +{
> +       if (cmd[1] == NULL)
> +               return;
> +
> +       if (conn_state != STATE_DISCONNECTED)
> +               return;
> +
> +       if (strcasecmp(cmd[1], "le") == 0)
> +               opt_le = TRUE;
> +       else if (strcasecmp(cmd[1], "br") == 0)
> +               opt_le = FALSE;

I've noticed every command callback has the two lines below. Would be
possible to move them to after the callback is called ?

> +
> +       rl_set_prompt(get_prompt());
> +       rl_redisplay();
> +}
> +

Regards,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
--
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