diff options
author | Sven Gothel <[email protected]> | 2023-10-23 08:12:39 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-10-23 08:12:39 +0200 |
commit | 6e1375d553237b7c8ad078e84ffe3625c9570ca4 (patch) | |
tree | d6f39ace2b0511c322c71d5330f3ac06280412b1 /src/direct_bt | |
parent | e1831442a57689a89084d096f64fd69ac7bb51d3 (diff) |
HCIHandler::receiveCommandComplete(..): Preserve returned CMD_STATUS error status
Diffstat (limited to 'src/direct_bt')
-rw-r--r-- | src/direct_bt/HCIHandler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/direct_bt/HCIHandler.cpp b/src/direct_bt/HCIHandler.cpp index f79e86d9..f5d74be0 100644 --- a/src/direct_bt/HCIHandler.cpp +++ b/src/direct_bt/HCIHandler.cpp @@ -1994,6 +1994,10 @@ std::unique_ptr<HCIEvent> HCIHandler::receiveCommandComplete(HCICommand &req, } return nullptr; // timeout } else if( nullptr == ev_cc ) { + if( ev->isEvent(HCIEventType::CMD_STATUS) ) { + HCICommandStatusEvent * ev_cs = static_cast<HCICommandStatusEvent*>(ev.get()); + *status = ev_cs->getStatus(); + } if( !quiet || jau::environment::get().verbose ) { WARN_PRINT("%s -> %s: Status 0x%2.2X (%s), errno %d %s: res %s, req %s - %s", to_string(req.getOpcode()).c_str(), to_string(evc).c_str(), |