2014-10-06 07:49:39

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCH] android/gatt: Fix unneeded increment

From: Andrei Emeltchenko <[email protected]>

---
android/gatt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/gatt.c b/android/gatt.c
index dbe067f..ecd1813 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -3169,7 +3169,7 @@ static guint signed_write_cmd(struct gatt_device *dev, uint16_t handle,
return 0;
}

- bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, sign_cnt++);
+ bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, sign_cnt);

return res;
}
--
1.9.1



2014-10-06 13:50:16

by Szymon Janc

[permalink] [raw]
Subject: Re: [RFC] android/gatt: Fix sign_cnt increment

Hi Andrei,

On Monday 06 of October 2014 11:13:58 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <[email protected]>
>
> ---
> android/gatt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index dbe067f..718b137 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -3169,7 +3169,7 @@ static guint signed_write_cmd(struct gatt_device *dev, uint16_t handle,
> return 0;
> }
>
> - bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, sign_cnt++);
> + bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, ++sign_cnt);
>
> return res;
> }

Applied. Thanks.

--
Best regards,
Szymon Janc

2014-10-06 11:14:16

by Andrei Emeltchenko

[permalink] [raw]
Subject: Re: [PATCH] android/gatt: Fix unneeded increment

Hi Lukasz,

On Mon, Oct 06, 2014 at 01:06:49PM +0200, Lukasz Rymanowski wrote:
> Hi Andrei,
>
> On Mon, Oct 6, 2014 at 9:49 AM, Andrei Emeltchenko
> <[email protected]> wrote:
> > From: Andrei Emeltchenko <[email protected]>
> >
> > ---
> > android/gatt.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/android/gatt.c b/android/gatt.c
> > index dbe067f..ecd1813 100644
> > --- a/android/gatt.c
> > +++ b/android/gatt.c
> > @@ -3169,7 +3169,7 @@ static guint signed_write_cmd(struct gatt_device *dev, uint16_t handle,
> > return 0;
> > }
> >
> > - bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, sign_cnt++);
> > + bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, sign_cnt);
>
> Your rfc: "[RFC] android/gatt: Fix sign_cnt increment" shall be used
> instead of this patch.

Yes, it was sent later. I called it RFC since wanted double check from the
code authors.

Best regards
Andrei Emeltchenko


2014-10-06 11:06:49

by Lukasz Rymanowski

[permalink] [raw]
Subject: Re: [PATCH] android/gatt: Fix unneeded increment

Hi Andrei,

On Mon, Oct 6, 2014 at 9:49 AM, Andrei Emeltchenko
<[email protected]> wrote:
> From: Andrei Emeltchenko <[email protected]>
>
> ---
> android/gatt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index dbe067f..ecd1813 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -3169,7 +3169,7 @@ static guint signed_write_cmd(struct gatt_device *dev, uint16_t handle,
> return 0;
> }
>
> - bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, sign_cnt++);
> + bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, sign_cnt);

Your rfc: "[RFC] android/gatt: Fix sign_cnt increment" shall be used
instead of this patch.

Thanks
\Lukasz
>
> return res;
> }
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2014-10-06 08:13:58

by Andrei Emeltchenko

[permalink] [raw]
Subject: [RFC] android/gatt: Fix sign_cnt increment

From: Andrei Emeltchenko <[email protected]>

---
android/gatt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/gatt.c b/android/gatt.c
index dbe067f..718b137 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -3169,7 +3169,7 @@ static guint signed_write_cmd(struct gatt_device *dev, uint16_t handle,
return 0;
}

- bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, sign_cnt++);
+ bt_update_sign_counter(&dev->bdaddr, LOCAL_CSRK, ++sign_cnt);

return res;
}
--
1.9.1