Skip to content

Commit 2c7bc31

Browse files
authored
ICD: Remove the aborts for ICD manager checks (project-chip#37728)
1 parent c5bc0d7 commit 2c7bc31

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/app/InteractionModelEngine.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -2185,14 +2185,10 @@ bool InteractionModelEngine::HasSubscriptionsToResume()
21852185
void InteractionModelEngine::DecrementNumSubscriptionsToResume()
21862186
{
21872187
VerifyOrReturn(mNumOfSubscriptionsToResume > 0);
2188-
#if CHIP_CONFIG_ENABLE_ICD_CIP && !CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION
2189-
VerifyOrDie(mICDManager);
2190-
#endif // CHIP_CONFIG_ENABLE_ICD_CIP && !CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION
2191-
21922188
mNumOfSubscriptionsToResume--;
21932189

21942190
#if CHIP_CONFIG_ENABLE_ICD_CIP && !CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION
2195-
if (!mNumOfSubscriptionsToResume)
2191+
if (mICDManager && !mNumOfSubscriptionsToResume)
21962192
{
21972193
mICDManager->SetBootUpResumeSubscriptionExecuted();
21982194
}

src/app/server/Dnssd.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,11 @@ CHIP_ERROR DnssdServer::SetEphemeralDiscriminator(Optional<uint16_t> discriminat
149149
template <class AdvertisingParams>
150150
void DnssdServer::AddICDKeyToAdvertisement(AdvertisingParams & advParams)
151151
{
152-
VerifyOrDieWithMsg(mICDManager != nullptr, Discovery,
153-
"Invalid pointer to the ICDManager which is required for the LIT operating mode");
152+
if (mICDManager == nullptr)
153+
{
154+
ChipLogError(Discovery, "Invalid pointer to the ICDManager which is required for adding Dnssd advertisement key");
155+
return;
156+
}
154157

155158
Dnssd::ICDModeAdvertise ICDModeToAdvertise = Dnssd::ICDModeAdvertise::kNone;
156159
// Only advertise the ICD key if the device can operate as a LIT

0 commit comments

Comments
 (0)