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: Fix mcc.c conn logging statements #52429

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Nov 21, 2022

mcc.c does not include conn_internal.h so it does not know the bt_conn struct, causing logging issues when trying to log a bt_conn pointer.

Fixed by casting the conn pointers to (void *).

Signed-off-by: Emil Gydesen [email protected]

mcc.c does not include `conn_internal.h` so it does not
know the `bt_conn` struct, causing logging issues when
trying to log a `bt_conn` pointer.

Fixed by casting the `conn` pointers to `(void *)`.

Signed-off-by: Emil Gydesen <[email protected]>
@Thalley Thalley added the bug The issue is a bug, or the PR is fixing a bug label Nov 21, 2022
@sjanc
Copy link
Collaborator

sjanc commented Nov 21, 2022

hmm does %p causes dereference of pointer? (looks kinda odd that it needs to know structure to print pointer)

@Thalley
Copy link
Collaborator Author

Thalley commented Nov 21, 2022

hmm does %p causes dereference of pointer? (looks kinda odd that it needs to know structure to print pointer)

I honestly don't why it is required (I mean, it's just a pointer value...), but after switching to the new logging system this has been required.

The alternative is to include conn_internal.h.

@alexsven alexsven self-requested a review November 22, 2022 07:54
@carlescufi carlescufi merged commit 02226d0 into zephyrproject-rtos:main Nov 22, 2022
@Thalley Thalley deleted the mcc_log_conn branch November 22, 2022 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Audio area: Bluetooth bug The issue is a bug, or the PR is fixing a bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants