Skip to content

Commit

Permalink
clean defines
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Jun 2, 2023
1 parent fbeb297 commit fc49437
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/app/icd/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ source_set("manager-srcs") {
# ICD Server Configuration
# All configurations necessary to the ICD Server featureset need to in this configuration
config("server-config") {
defines = [ "CHIP_CONFIG_ICD_SERVER_ENABLE=${chip_enable_icd_server}" ]
defines = [ "CHIP_CONFIG_ICD_SERVER_ENABLE" ]
}

# servers-srcs source-set contains all the sources and configurations necessary to build the ICD Server functionality
Expand Down
8 changes: 4 additions & 4 deletions src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
}
#endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT

#if CHIP_CONFIG_ENABLE_ICD_SERVER
#ifdef CHIP_CONFIG_ICD_SERVER_ENABLE
mICDEventManager.Init(&mICDManager);
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
#endif // CHIP_CONFIG_ICD_SERVER_ENABLE

// This initializes clusters, so should come after lower level initialization.
InitDataModelHandler();
Expand Down Expand Up @@ -488,9 +488,9 @@ void Server::Shutdown()
mAccessControl.Finish();
Access::ResetAccessControlToDefault();
Credentials::SetGroupDataProvider(nullptr);
#if CHIP_CONFIG_ENABLE_ICD_SERVER
#ifdef CHIP_CONFIG_ICD_SERVER_ENABLE
mICDEventManager.Shutdown();
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
#endif // CHIP_CONFIG_ICD_SERVER_ENABLE
mAttributePersister.Shutdown();
// TODO(16969): Remove chip::Platform::MemoryInit() call from Server class, it belongs to outer code
chip::Platform::MemoryShutdown();
Expand Down
16 changes: 8 additions & 8 deletions src/app/server/Server.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
#endif
#include <transport/raw/UDP.h>

#if CHIP_CONFIG_ENABLE_ICD_SERVER
#include <app/ICDEventManager.h>
#include <app/ICDManager.h>
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
#ifdef CHIP_CONFIG_ICD_SERVER_ENABLE
#include <app/icd/ICDEventManager.h>
#include <app/icd/ICDManager.h>
#endif // CHIP_CONFIG_ICD_SERVER_ENABLE

namespace chip {

Expand Down Expand Up @@ -600,10 +600,10 @@ class Server
Inet::InterfaceId mInterfaceId;

System::Clock::Microseconds64 mInitTimestamp;
#if CHIP_CONFIG_ENABLE_ICD_SERVER
DeviceLayer::ICDEventManager mICDEventManager;
DeviceLayer::ICDManager mICDManager;
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
#ifdef CHIP_CONFIG_ICD_SERVER_ENABLE
app::ICDEventManager mICDEventManager;
app::ICDManager mICDManager;
#endif // CHIP_CONFIG_ICD_SERVER_ENABLE
};

} // namespace chip

0 comments on commit fc49437

Please sign in to comment.