| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getrandom and sys/random.h are only available since glibc 2.25:
https://www.gnu.org/software/gnulib/manual/html_node/sys_002frandom_002eh.html
resulting in the following build failures since version 5.63 and
https://git.kernel.org/pub/scm/bluetooth/bluez.git/log/?qt=grep&q=getrandom:
plugins/autopair.c:20:24: fatal error: sys/random.h: No such file or directory
#include <sys/random.h>
^
To fix this build failure, add util_getrandom and a fallback (borrowed
from pipewire and licensed under MIT):
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/pipewire/utils.c
Fixes:
- http://autobuild.buildroot.org/results/6b8870d12e0804d6154230a7322c49416c1dc0e2
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the GError variable is freeed with g_error_free(), it is not set to
NULL and reusing the same variable again can cause the seg_fault because
it is still pointing the old memory address which is freed.
This patch relaces the g_error_free() to g_clear_error() which frees the
variable and set it to NULL if the variable is used in the function
again.
Fixes: 4ad622d592ba5 ("profiles/a2dp: Fix unchecked return value")
|
|
|
|
|
|
|
|
| |
This patch replaces the rand() function to the getrandom() syscall.
It was reported by the Coverity scan
rand() should not be used for security-related applications, because
linear congruential algorithms are too easy to break
|
|
|
|
|
|
|
|
| |
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central" and "peripheral".
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
| |
Replace calls to g_timeout_add_seconds() by the timeout_add_seconds()
wrapper which takes care of 0 delay.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds SPDX License Identifier and removes the license text.
-------------------------------------
License COUNT
-------------------------------------
GPL-2.0-or-later : 72
LGPL-2.1-or-later : 6
License: GPL-2.0-or-later
profiles/deviceinfo/dis.c
profiles/deviceinfo/deviceinfo.c
profiles/health/hdp_types.h
profiles/health/mcap.c
profiles/health/hdp_manager.c
profiles/health/hdp_main.c
profiles/health/mcap.h
profiles/health/hdp_util.h
profiles/health/hdp_manager.h
profiles/health/hdp_util.c
profiles/health/hdp.c
profiles/health/hdp.h
profiles/network/server.c
profiles/network/connection.h
profiles/network/connection.c
profiles/network/manager.c
profiles/network/bnep.c
profiles/network/server.h
profiles/network/bnep.h
profiles/battery/battery.c
profiles/cups/cups.h
profiles/cups/sdp.c
profiles/cups/main.c
profiles/cups/spp.c
profiles/cups/hcrp.c
profiles/scanparam/scpp.c
profiles/scanparam/scan.c
profiles/audio/transport.h
profiles/audio/avdtp.h
profiles/audio/source.c
profiles/audio/player.c
profiles/audio/avctp.c
profiles/audio/control.h
profiles/audio/a2dp.c
profiles/audio/source.h
profiles/audio/transport.c
profiles/audio/sink.c
profiles/audio/avrcp.h
profiles/audio/avdtp.c
profiles/audio/a2dp.h
profiles/audio/avrcp.c
profiles/audio/media.h
profiles/audio/avctp.h
profiles/audio/control.c
profiles/audio/sink.h
profiles/audio/player.h
profiles/audio/media.c
profiles/sap/server.c
profiles/sap/sap-dummy.c
profiles/sap/main.c
profiles/sap/sap.h
profiles/sap/manager.c
profiles/sap/server.h
profiles/sap/manager.h
profiles/iap/main.c
profiles/gap/gas.c
profiles/midi/midi.c
profiles/midi/libmidi.c
profiles/midi/libmidi.h
profiles/input/server.c
profiles/input/suspend.h
profiles/input/uhid_copy.h
profiles/input/device.c
profiles/input/hog.c
profiles/input/device.h
profiles/input/hidp_defs.h
profiles/input/manager.c
profiles/input/suspend-none.c
profiles/input/sixaxis.h
profiles/input/hog-lib.c
profiles/input/suspend-dummy.c
profiles/input/server.h
License: LGPL-2.1-or-later
profiles/deviceinfo/dis.h
profiles/battery/bas.h
profiles/battery/bas.c
profiles/scanparam/scpp.h
profiles/audio/a2dp-codecs.h
profiles/input/hog-lib.h
|
|
|
|
|
| |
bt_io modes are no longer compatible with L2CAP modes so the later
shall not used with bt_io APIs.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
As described in coding style M10.
|
|
|
|
| |
Indentions should be tabbed to keep consist with other structs.
|
| |
|
|
|
|
|
| |
Now profiles/health/ , android/health and mcaptest will use
profiles/health/mcap-lib.
|
|
|
|
|
|
|
|
|
|
|
|
| |
tid holds glib source id and should be of guint type.
This fix following compilation error with musl:
CC profiles/health/bluetoothd-hdp.o
profiles/health/hdp.c:84:2: error: unknown type name 'uint'
uint tid; /* echo timeout */
^
Please enter the commit message for your changes. Lines starting
|
| |
|
|
|
|
| |
Improves readability of the code using similar check for not NULL.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Function sdp_set_add_access_protos() always returns 0, so there is no
sense to check for error code.
|
|
|
|
|
| |
sdp_set_access_protos() always returns 0, there is no sense to check for
error code. Fixes compile warnings.
|
|
|
|
| |
DBG() includes function name by default, so including it is not needed.
|
|
|
|
|
| |
Fixes static analyzer warnings related to casting possible error code to
unsigned.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sdp record preparation part is copied to android/health.c from
profiles/health/hdp_utils.c. Memory leak is noticed while testing. Memory
summay is from android daemon, but code snippet is same. It is already fixed
in android/health.c while submitting android related patches.
==12515== 286 (16 direct, 270 indirect) bytes in 1 blocks are definitely lost in loss record 158 of 165
==12515== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==12515== by 0x44AC45: sdp_list_append (sdp.c:1743)
==12515== by 0x4398F9: register_features (health.c:381)
==12515== by 0x4091CC: queue_foreach (queue.c:219)
==12515== by 0x43A31F: bt_health_mdep_cfg_data (health.c:398)
==12515== by 0x418B50: cmd_watch_cb (ipc.c:144)
==12515== by 0x4E7FCE4: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==12515== by 0x4E80047: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==12515== by 0x4E80309: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==12515== by 0x4044F2: main (main.c:538)
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes clang warning:
...
CC profiles/health/bluetoothd-hdp.o
profiles/health/hdp.c:1778:13: warning: Access to field 'message'
results in a dereference of a null pointer (loaded from variable 'gerr')
"%s", gerr->message);
^~~~~~~~~~~~~
...
|
| |
|
|
|
|
| |
For some reason, HealthDevice property table wasn't been registered.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This allows to pass custom SDP flags to sdp_connect.
|
|
|
|
|
|
|
|
|
|
| |
The values to which this field is set have nothing to do with MCAPCtrl.
Fixes clang error:
profiles/health/mcap_sync.c:767:24: error: comparison of constant 17
with expression of type 'MCAPCtrl' is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
|
|
|
|
| |
Allow this symbol to be exported and usable from external plugins.
|
|
|
|
| |
Allow this symbol to be exported and usable from external plugins.
|
|
|
|
|
| |
Make adapter in charge of updating SDP database. This allow to decouple
SDP of code used for notifying adapters about SDP database change.
|
|
|
|
|
| |
Make adapter in charge of updating SDP database. This allow to decouple
SDP of code used for notifying adapters about SDP database change.
|
|
|
|
|
| |
Use plain int instead of gint. In glib gint is always a typedef to int,
so it's safe to use it even for callbacks with glib.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the profile probe mechanism in order to pass the btd_service
instance representing the remote service. This object is bound to a
btd_profile and a btd_device, thus replacing the previous parameters.
The probe callback is allowed to hold a reference to the btd_service
by means of btd_service_ref(), which should be unreferenced during
removal.
Keeping such a reference of the btd_service allows supporting multiple
instances of the same UUID, since the reference can serve as a handle
during the interactions between the profile implementation and the core.
|
|
|
|
|
|
| |
Each instance of btd_profile is associated to one single remote UUID
and therefore the list provided by the callback is redundant and can be
removed.
|
|
|
|
|
| |
The code can be considerably simplified by constraining struct
btd_profile to one single remote UUID.
|
|
|
|
| |
Register a separate btd_profile for each health device role.
|
| |
|
|
|
|
|
| |
A pointer to freed memory is dereferenced if we call function
hdp_get_dcpsm_cb() with out any earlier reference.
|
| |
|