Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@codecoup.pl>
To: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 4/8] tools/btpclient: Restore default settings on reset
Date: Tue, 23 Jan 2018 14:48:48 +0100	[thread overview]
Message-ID: <2383001.ylVEV99tJ0@ix> (raw)
In-Reply-To: <20180119164133.16767-4-grzegorz.kolodziejczyk@codecoup.pl>

Hi Grzegorz,

On Friday, 19 January 2018 17:41:29 CET Grzegorz Kolodziejczyk wrote:
> Reset command will restore default settings of adapter.
> ---
>  tools/btpclient.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/btpclient.c b/tools/btpclient.c
> index 708092937..c5f88e673 100644
> --- a/tools/btpclient.c
> +++ b/tools/btpclient.c
> @@ -56,6 +56,7 @@ struct btp_adapter {
>  	uint8_t index;
>  	uint32_t supported_settings;
>  	uint32_t current_settings;
> +	uint32_t default_settings;
>  	struct l_queue *devices;
>  };
> 
> @@ -538,6 +539,8 @@ static void btp_gap_reset(uint8_t index, const void
> *param, uint16_t length, goto failed;
>  		}
> 
> +	adapter->current_settings = adapter->default_settings;
> +
>  	/* TODO for we assume all went well */
>  	btp_send(btp, BTP_GAP_SERVICE, BTP_OP_GAP_RESET, index, 0, NULL);
>  	return;
> @@ -2207,6 +2210,8 @@ static void proxy_added(struct l_dbus_proxy *proxy,
> void *user_data) extract_settings(proxy, &adapter->current_settings,
>  						&adapter->supported_settings);
> 
> +		adapter->default_settings = adapter->current_settings;
> +
>  		l_queue_push_tail(adapters, adapter);
>  		return;
>  	}

Patch applied, thanks.

-- 
pozdrawiam
Szymon Janc



  reply	other threads:[~2018-01-23 13:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 16:41 [PATCH BlueZ 1/8] tools/btpclient: Fix start adv commend comment Grzegorz Kolodziejczyk
2018-01-19 16:41 ` [PATCH BlueZ 2/8] tools/btpclient: Initial check of ad_proxy presence in stop adv cmd Grzegorz Kolodziejczyk
2018-01-19 16:41 ` [PATCH BlueZ 3/8] tools/btpclient: Add set io capabilities command Grzegorz Kolodziejczyk
2018-01-23 13:48   ` Szymon Janc
2018-01-23 15:06     ` Grzegorz Kołodziejczyk
2018-01-19 16:41 ` [PATCH BlueZ 4/8] tools/btpclient: Restore default settings on reset Grzegorz Kolodziejczyk
2018-01-23 13:48   ` Szymon Janc [this message]
2018-01-19 16:41 ` [PATCH BlueZ 5/8] tools/btpclient: Cleanup advertising data " Grzegorz Kolodziejczyk
2018-01-19 16:41 ` [PATCH BlueZ 6/8] tools/btpclient: Add pair, unpair commands Grzegorz Kolodziejczyk
2018-01-23 13:53   ` Szymon Janc
2018-01-23 15:08     ` Grzegorz Kołodziejczyk
2018-01-19 16:41 ` [PATCH BlueZ 7/8] tools/btpclient: Add passkey entry cmd and passkey display event Grzegorz Kolodziejczyk
2018-01-19 16:41 ` [PATCH BlueZ 8/8] tools/btpclient: Add passkey confirm ev and passkey confirm rsp cmd Grzegorz Kolodziejczyk
2018-01-23 14:03   ` Szymon Janc
2018-01-23 15:09     ` Grzegorz Kołodziejczyk
2018-01-23 13:44 ` [PATCH BlueZ 1/8] tools/btpclient: Fix start adv commend comment Szymon Janc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2383001.ylVEV99tJ0@ix \
    --to=szymon.janc@codecoup.pl \
    --cc=grzegorz.kolodziejczyk@codecoup.pl \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox