Skip to content

Commit

Permalink
fix tv-casting commissioning (#15298)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdecenzo authored and pull[bot] committed Oct 23, 2023
1 parent 5b1cc58 commit 3603893
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/platform/linux/AppMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ CHIP_ERROR InitCommissioner()

factoryParams.fabricStorage = &gFabricStorage;
// use a different listen port for the commissioner than the default used by chip-tool.
factoryParams.listenPort = LinuxDeviceOptions::GetInstance().securedCommissionerPort + 10;
factoryParams.listenPort = LinuxDeviceOptions::GetInstance().securedCommissionerPort + 10;
factoryParams.fabricIndependentStorage = &gServerStorage;

params.storageDelegate = &gServerStorage;
params.deviceAddressUpdateDelegate = nullptr;
params.operationalCredentialsDelegate = &gOpCredsIssuer;
Expand Down Expand Up @@ -584,7 +586,7 @@ void ChipLinuxAppMainLoop()
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());

#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE
InitCommissioner();
VerifyOrReturn(InitCommissioner() == CHIP_NO_ERROR);
#if defined(ENABLE_CHIP_SHELL)
Shell::RegisterControllerCommands();
#endif // defined(ENABLE_CHIP_SHELL)
Expand Down
3 changes: 3 additions & 0 deletions examples/tv-casting-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ OptionSet * allOptions[] = { &cmdLineOptions, &helpOptions, nullptr };
*/
void PrepareForCommissioning(const Dnssd::DiscoveredNodeData * selectedCommissioner = nullptr)
{
// DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init("/tmp/chip_tv_casting_kvs");
DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(CHIP_CONFIG_KVS_PATH);

// Enter commissioning mode, open commissioning window
Server::GetInstance().Init();
Server::GetInstance().GetFabricTable().DeleteAllFabrics();
Expand Down

0 comments on commit 3603893

Please sign in to comment.