Skip to content

Commit 2a8c8e7

Browse files
Fixing Darwin CI build issue
1 parent c965cde commit 2a8c8e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/tv-casting-app/tv-casting-common/core/CastingApp.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ CHIP_ERROR CastingApp::PostStartRegistrations()
140140
// Register DeviceEvent Handler
141141
ReturnErrorOnFailure(chip::DeviceLayer::PlatformMgrImpl().AddEventHandler(ChipDeviceEventHandler::Handle, 0));
142142

143+
#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT
143144
// Set a handler for Commissioner's CommissionerDeclaration messages.
144145
chip::Server::GetInstance().GetUserDirectedCommissioningClient()->SetCommissionerDeclarationHandler(
145146
CommissionerDeclarationHandler::GetInstance());
147+
#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT
146148

147149
mState = CASTING_APP_RUNNING; // CastingApp started successfully, set state to RUNNING
148150
return CHIP_NO_ERROR;
@@ -153,8 +155,10 @@ CHIP_ERROR CastingApp::Stop()
153155
ChipLogProgress(Discovery, "CastingApp::Stop() called");
154156
VerifyOrReturnError(mState == CASTING_APP_RUNNING, CHIP_ERROR_INCORRECT_STATE);
155157

158+
#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT
156159
// Remove the handler previously set for Commissioner's CommissionerDeclaration messages.
157160
chip::Server::GetInstance().GetUserDirectedCommissioningClient()->SetCommissionerDeclarationHandler(nullptr);
161+
#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT
158162

159163
// Shutdown the Matter server
160164
chip::Server::GetInstance().Shutdown();

0 commit comments

Comments
 (0)