Skip to content

Commit 9de2fd7

Browse files
brosahayrosahay-silabs
authored andcommitted
Refactor Logging and Clean Up Redundant Code
1 parent a3ef17d commit 9de2fd7

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

examples/platform/silabs/BaseApplication.cpp

+2-12
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ void BaseApplication::DoProvisioningReset()
820820
CHIP_ERROR err = Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow();
821821
if (err != CHIP_NO_ERROR)
822822
{
823-
SILABS_LOG("Failed to open the Basic Commissioning Window");
823+
ChipLogError(AppServer, "Failed to open the Basic Commissioning Window");
824824
}
825825
});
826826
}
@@ -838,7 +838,7 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
838838
VerifyOrReturn(event->InternetConnectivityChange.IPv4 == kConnectivity_Established);
839839
if (DIC_OK != dic_init(dic::control::subscribeCB))
840840
{
841-
SILABS_LOG("Failed to initialize DIC module\n");
841+
ChipLogError(AppServer, "dic_init failed");
842842
}
843843
#endif // DIC_ENABLE
844844
break;
@@ -855,16 +855,6 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
855855
default:
856856
break;
857857
}
858-
#ifdef DIC_ENABLE
859-
else if (event->Type == DeviceEventType::kInternetConnectivityChange)
860-
{
861-
VerifyOrReturn(event->InternetConnectivityChange.IPv4 == kConnectivity_Established);
862-
if (DIC_OK != dic_init(dic::control::subscribeCB))
863-
{
864-
ChipLogDetail(AppServer, "Failed to initialize DIC module");
865-
}
866-
}
867-
#endif // DIC_ENABLE
868858
}
869859

870860
void BaseApplication::OutputQrCode(bool refreshLCD)

0 commit comments

Comments
 (0)