Re: [PATCH 3/5] android/hal-bluetooth: Add support for remote version info property

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

 



Hi Szymon,

On Fri, Dec 20, 2013 at 6:25 AM, Szymon Janc <szymon.janc@xxxxxxxxx> wrote:
> +#if PLATFORM_SDK_VERSION > 17
>                 case HAL_PROP_DEVICE_VERSION_INFO:
> +               {
> +                       static bt_remote_version_t e;
> +                       const struct hal_prop_device_info *p;
> +                       uint16_t tmp;
> +
> +                       send_props[i].val = &e;
> +                       send_props[i].len = sizeof(e);
> +
> +                       p = (struct hal_prop_device_info *) prop->val;
> +
> +                       memcpy(&tmp, &p->manufacturer, sizeof(tmp));
> +                       e.manufacturer = tmp;
> +                       memcpy(&tmp, &p->sub_version, sizeof(tmp));
> +                       e.sub_ver = tmp;
> +                       e.version = p->version;

I fail to see why you need the "tmp" variable above (p->manufacturer
and p->sub_version are both uint16_t according to hal-msg.h).

> +               }
> +                       break;
> +#endif
> +               case HAL_PROP_DEVICE_SERVICE_REC:
>                 default:
>                         send_props[i].len = prop->len;
>                         send_props[i].val = prop->val;

Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - 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