Skip to content

Conversation

Thalley
Copy link
Contributor

@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
Contributor

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
Contributor 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