Age | Commit message (Collapse) | Author | Files | Lines |
|
This change should have been part of commit c5db00e,
but was by mistake left behind. This change includes
guards against null pointers in case of a system with
no bluetooth adapter.
Bug-AGL: SPEC-3301
Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Change-Id: I01cf72515a8e1e28fa26974927adb605c1a06dbd
|
|
During start up, there are races between the
bluetooth, persistence, bluetooth-map and
bluetooth-pbap bindings; on top of it, in the
case there's no bluetooth controller in the system,
various key parameters can exhibit a null value.
The combination of these races and the lack of
bluetooth controller can manifest in a number of
segfaults in the bluetooth binding (it's very easy
to reproduce on qemu).
This commit brings in several changes to make the
bluetooth binding resilient to the races and lack
of bluetooth controller:
* on startup, retrieve the default adapter from
the persistence binding from the init thread
* store the system default adapter in the service
init data structure, and store the active adapter
in the bluetooth state structure.
* update get_default_adapter to return value
obtained from persistence biding, without further
processing;
* add guards to make sure the userdata retrieved
from the application framework is valid;
* on verbs processing, ensure the caller provides
an adapter to apply the verb to, or that at least
there's a valid adapter associated to the
bluetooth state structure;
* initialize agent_data's device_path following free
operation;
* add guards for mediaplayer_path.
Bug-AGL: SPEC-3301
Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Change-Id: Ia5a0dc9a61024ff43cd247216d0dff6918046f7e
|
|
/work/agl-service-bluetooth/binding/bluetooth-util.c:170:14: warning:
integer overflow in expression ‘-2147483648’ of type ‘long int’
results in ‘-2147483648’ [-Woverflow]
if (i64 >= -(1L << 31) && i64 < (1L << 31))
^
In file included from /xdt/sdk/sysroots/
armv7vet2hf-neon-vfpv4-agl-linux-gnueabi/usr/include/afb/afb-binding.h:
116,
from /work/agl-service-bluetooth/binding/
bluetooth-util.c:36:
/work/agl-service-bluetooth/binding/bluetooth-util.c:291:16: warning:
format ‘%lu’ expects argument of type ‘long unsigned int’, but argument
7 has type ‘gsize’ {aka ‘unsigned int’} [-Wformat=]
AFB_WARNING("Can't handle variants with more than one children
(%lu)", nitems);
Bug-AGL: SPEC-2422
Change-Id: Ic0f1a9f20c8bbe17040c3c9727922bc930b6f786
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
|
|
Remove follow warnings by switching from int to size_t
warning: conversion from ‘size_t’ {aka ‘long unsigned int’} to ‘int’ may change value [-Wconversion]
Bug-AGL: SPEC-2535
Change-Id: I28330f92097adc6aa03480078d168d37a60fc051
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
Allow setting of default adapter for use by other verbs within
the binding. This allows to select an adapter on boards with more than one.
Bug-AGL: SPEC-1630
Change-Id: Iec77b0abaa9f4c092dc5c827522efb1744953fce
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
Report back MediaPlayer1 interface events for A2DP media playback
Bug-AGL: SPEC-1630
Change-Id: I777f19af2de247fe676d5bede4bacbbad8ca9844
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
Don't send adapter name in 'device' parameter on removal of
bluetooth interface.
Bug-AGL: SPEC-1630
Change-Id: I15cb4dcc791d36beb8e8b41993644cad331d3cae
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
Validate device input to filter out special characters being sent that
may cause the dbus call to hang or segfault.
Bug-AGL: SPEC-1630
Change-Id: I31aa458154c030181b905b7ccc9d6a8aa0f84ef0
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
Allow clients to request devices only with certain profile UUIDs to be
displayed in an discovery scan. This allows to filter out things like
location tokens, smart scales, and etc which can't possibly have a2dp
or hfp profiles for instance.
NOTE: This is a write only setting. In the future should be read/write
to see current discovery filters.
Bug-AGL: SPEC-1630
Change-Id: Ic8b18656f84ac8047b170d6e601fcc2e63786af0
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
Bug-AGL: SPEC-1630
Change-Id: I8e55d273ab58992e6f6327523853c6d330505278
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
Concatenate adapter and device parameters to return a bluez path for
usage within the binding's dbus calls.
Bug-AGL: SPEC-1630
Change-Id: I4c96fa48baaf12b23aac98ba35f1ca82f7005bcb
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
To allow this binding API to be bluetooth stack agnostic remove pure
bluez paths, and replace with generic fields.
Bug-AGL: SPEC-1630
Change-Id: Iadba73782b6339df2ca5937e16a654e7ef3e477b
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|
|
Bug-AGL: SPEC-1630
Change-Id: I33cfec70283fa29f47b76f9e6be3e8e6cd6a2f54
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
|