diff options
-rw-r--r-- | api/direct_bt/HCIHandler.hpp | 1 | ||||
-rw-r--r-- | src/direct_bt/HCIHandler.cpp | 26 |
2 files changed, 0 insertions, 27 deletions
diff --git a/api/direct_bt/HCIHandler.hpp b/api/direct_bt/HCIHandler.hpp index fb06362a..432856b6 100644 --- a/api/direct_bt/HCIHandler.hpp +++ b/api/direct_bt/HCIHandler.hpp @@ -105,7 +105,6 @@ namespace direct_bt { bool sendCommand(HCICommand &req); std::shared_ptr<HCIEvent> getNextReply(HCICommand &req, int & retryCount); - std::shared_ptr<HCIEvent> sendWithReply(HCICommand &req); std::shared_ptr<HCIEvent> sendWithCmdCompleteReply(HCICommand &req, HCICommandCompleteEvent **res); diff --git a/src/direct_bt/HCIHandler.cpp b/src/direct_bt/HCIHandler.cpp index e7355a41..1ea6592a 100644 --- a/src/direct_bt/HCIHandler.cpp +++ b/src/direct_bt/HCIHandler.cpp @@ -154,32 +154,6 @@ std::shared_ptr<HCIEvent> HCIHandler::getNextReply(HCICommand &req, int & retryC return nullptr; } -std::shared_ptr<HCIEvent> HCIHandler::sendWithReply(HCICommand &req) { - if( pass_replies_only_filter ) { - hci_ufilter filter = filter_mask; - HCIComm::filter_set_opcode(number(req.getOpcode()), &filter); - if (setsockopt(comm.dd(), SOL_HCI, HCI_FILTER, &filter, sizeof(filter)) < 0) { - ERR_PRINT("HCIHandler::sendWithReply.0: setsockopt"); - return nullptr; - } - } - int retryCount = 0; - std::shared_ptr<HCIEvent> ev = nullptr; - - if( !sendCommand(req) ) { - goto exit; - } - ev = getNextReply(req, retryCount); - -exit: - if( pass_replies_only_filter ) { - if (setsockopt(comm.dd(), SOL_HCI, HCI_FILTER, &filter_mask, sizeof(filter_mask)) < 0) { - ERR_PRINT("HCIHandler::sendWithReply.X: setsockopt"); - } - } - return ev; -} - std::shared_ptr<HCIEvent> HCIHandler::sendWithCmdCompleteReply(HCICommand &req, HCICommandCompleteEvent **res) { *res = nullptr; |