This changes device info and gap services callbacks to use response queue.
It will allow them work with plain read and read by type as well.
This starts transition to single response data queue, which should be
filled by various read type functions and processed in one place. This
will unify the way that responses are send, regardless of data source
(value taken directly from database, returned by read callback or sent
from upper layers asynchronously).
We will also introduce 'getter' type functions, using handles to
retrieve data from database. This will make various read and find
operations return handles instead of their own custom structures,
different for every operation performed.
If value exists in database, return pointer to it instead of returning
false. It is needed because some attributes don't have read_cb callback
and their value can be read directly from database.
In the case that the remote starts connecting to us while we're waiting
for the timeout to discover we shouldn't just reset the basic time
keeping variables but also remove the timer.
This patch adds an API to monitor devices disconnections, including the
reason for the disconnection. It paves the way to allow creating a
policy for reconnecting when disconnected.
Fix following with GCC version 4.8.2 (Debian 4.8.2-21):
tools/hex2hcd.c: In function ‘main’:
tools/hex2hcd.c:118:19: error: comparison between signed and
unsigned integer expressions [-Werror=sign-compare]
for (i = 0; i < hex_to_int(rbuf + 1); i++) {
^
cc1: all warnings being treated as errors
Fix following with GCC version 4.8.2 (Debian 4.8.2-21):
CC profiles/input/bluetoothd-hog.o
profiles/input/hog.c: In function ‘report_value_cb’:
profiles/input/hog.c:149:8: error: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
[-Werror=format=]
status, sizeof(ev));
^
Fix following with GCC version 4.8.2 (Debian 4.8.2-21):
CC profiles/input/bluetoothd-device.o
profiles/input/device.c: In function ‘uhid_send_feature_answer’:
profiles/input/device.c:232:8: error: format ‘%lu’ expects argument
of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
[-Werror=format=]
len, sizeof(ev));
^
profiles/input/device.c: In function ‘uhid_send_input_report’:
profiles/input/device.c:274:8: error: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
[-Werror=format=]
len, sizeof(ev));
^
This adds refreshing of device cache in case if device is not bonded.
It affects on TC_GAD_CL_BV_01_C, TC_GAD_CL_BV_02_C and search services
PTS test cases. With this patch those PTS tests cases pass.
This patch fixes enabling advertising.
It was not possible to enable it if we had server registered
which is on listen_apps list but does not trigger advertising.
This patch introduces static counter to track number of clients
requested advertising.