Fix byte order for MGMT_OP_ADD_ADVERTISING flags
---
src/advertising.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/advertising.c b/src/advertising.c
index d56b7a2..8c249d1 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -500,7 +500,7 @@ static DBusMessage *refresh_advertisement(struct advertisement *ad)
return btd_error_failed(ad->reg, "Failed");
}
- cp->flags = flags;
+ cp->flags = htobl(flags);
cp->instance = ad->instance;
cp->adv_data_len = adv_data_len;
memcpy(cp->data, adv_data, adv_data_len);
--
1.9.1
Hi,
Andrejs Hanins <[email protected]> writes:
> Fix byte order for MGMT_OP_ADD_ADVERTISING flags
> ---
> src/advertising.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Looks good.
> diff --git a/src/advertising.c b/src/advertising.c
> index d56b7a2..8c249d1 100644
> --- a/src/advertising.c
> +++ b/src/advertising.c
> @@ -500,7 +500,7 @@ static DBusMessage *refresh_advertisement(struct advertisement *ad)
> return btd_error_failed(ad->reg, "Failed");
> }
>
> - cp->flags = flags;
> + cp->flags = htobl(flags);
> cp->instance = ad->instance;
> cp->adv_data_len = adv_data_len;
> memcpy(cp->data, adv_data, adv_data_len);
> --
> 1.9.1
Cheers,
--
Vinicius
Hi,
On 03/17/2016 10:02 AM, Johan Hedberg wrote:
> Hi,
>
> On Wed, Jul 22, 2015, Andrejs Hanins wrote:
>> Fix byte order for MGMT_OP_ADD_ADVERTISING flags
>> ---
>> src/advertising.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/advertising.c b/src/advertising.c
>> index d56b7a2..8c249d1 100644
>> --- a/src/advertising.c
>> +++ b/src/advertising.c
>> @@ -500,7 +500,7 @@ static DBusMessage *refresh_advertisement(struct advertisement *ad)
>> return btd_error_failed(ad->reg, "Failed");
>> }
>>
>> - cp->flags = flags;
>> + cp->flags = htobl(flags);
>> cp->instance = ad->instance;
>> cp->adv_data_len = adv_data_len;
>> memcpy(cp->data, adv_data, adv_data_len);
> I'm surprised you never pinged about this forgotten patch (which I
> noticed now when cleaning up my linux-bluetooth folder). Anyway, the
> patch has been applied. Thanks.
I was hoping that subject is an immediate attention grabber :)
I'm glad it is finally applied.
>
> Johan
Hi,
On Wed, Jul 22, 2015, Andrejs Hanins wrote:
> Fix byte order for MGMT_OP_ADD_ADVERTISING flags
> ---
> src/advertising.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/advertising.c b/src/advertising.c
> index d56b7a2..8c249d1 100644
> --- a/src/advertising.c
> +++ b/src/advertising.c
> @@ -500,7 +500,7 @@ static DBusMessage *refresh_advertisement(struct advertisement *ad)
> return btd_error_failed(ad->reg, "Failed");
> }
>
> - cp->flags = flags;
> + cp->flags = htobl(flags);
> cp->instance = ad->instance;
> cp->adv_data_len = adv_data_len;
> memcpy(cp->data, adv_data, adv_data_len);
I'm surprised you never pinged about this forgotten patch (which I
noticed now when cleaning up my linux-bluetooth folder). Anyway, the
patch has been applied. Thanks.
Johan