Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: Audio: Shell: Fix ad data returning -1 #85067

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Feb 3, 2025

Several advertising data function could return -1 in case of errors, which could mess up the advertising data since they are intended to increment a counter.

Instead of returning an error we use bt_shell_error to inform the user and then just return with no data changes, so that if any of them fails, the failing data is just omitted rather than causing major issues.

fixes #84700

Several advertising data function could return -1 in case of
errors, which could mess up the advertising data since they are
intended to increment a counter.

Instead of returning an error we use bt_shell_error to inform
the user and then just return with no data changes, so that if
any of them fails, the failing data is just omitted rather
than causing major issues.

Signed-off-by: Emil Gydesen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Coverity CID: 487730] Overflowed return value in subsys/bluetooth/audio/shell/bap.c
1 participant