bluez-experiments
bluez-experiments copied to clipboard
Passing current_hci_state as struct creates a copy that is unmodified after return
When you create a function such as: void start_hci_scan(struct hci_state current_hci_state) any changes within start_hci_scan will get discarded (like error states and messages)
To fix, the structure can be passed as a pointer, or as a reference, like void start_hci_scan(struct hci_state **&**current_hci_state)
In my case, hci_le_set_scan_parameters was returning an error, but the error was getting discarded.
I found this problem too.