Skip to content

Commit

Permalink
Listen for all BDX protocol messages rather than just the init messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
harimau-qirex committed Nov 5, 2024
1 parent bc870c2 commit 1807324
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/controller/python/chip/bdx/bdx-transfer-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ CHIP_ERROR BdxTransferServer::Init(Messaging::ExchangeManager * exchangeManager)
{
VerifyOrReturnError(exchangeManager != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
mExchangeManager = exchangeManager;
ReturnOnFailure(mExchangeManager->RegisterUnsolicitedMessageHandlerForType(MessageType::ReceiveAccept, this));
return mExchangeManager->RegisterUnsolicitedMessageHandlerForType(MessageType::SendAccept, this);
return mExchangeManager->RegisterUnsolicitedMessageHandlerForProtocol(Protocols::BDX::Id, this);
}

void BdxTransferServer::Shutdown()
{
VerifyOrReturn(mExchangeManager != nullptr);
LogErrorOnFailure(mExchangeManager->UnregisterUnsolicitedMessageHandlerForType(MessageType::ReceiveAccept));
LogErrorOnFailure(mExchangeManager->UnregisterUnsolicitedMessageHandlerForType(MessageType::SendAccept));
LogErrorOnFailure(mExchangeManager->UnregisterUnsolicitedMessageHandlerForProtocol(Protocols::BDX::Id));
mExchangeManager = nullptr;
}

Expand Down

0 comments on commit 1807324

Please sign in to comment.