Skip to content

Commit f24ad6e

Browse files
committedFeb 5, 2025
[nrf toup]Remove dependncy to Server
Signed-off-by: Adrian Gielniewski <adrian.gielniewski@gmail.com>
1 parent dfb3a6d commit f24ad6e

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed
 

‎src/app/server/Server.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -796,4 +796,9 @@ Crypto::DefaultSessionKeystore CommonCaseDeviceServerInitParams::sSessionKeystor
796796
app::DefaultICDCheckInBackOffStrategy CommonCaseDeviceServerInitParams::sDefaultICDCheckInBackOffStrategy;
797797
#endif
798798

799+
void ServerScheduleFactoryReset()
800+
{
801+
chip::Server::GetInstance().ScheduleFactoryReset();
802+
}
803+
799804
} // namespace chip

‎src/app/server/Server.h

+2
Original file line numberDiff line numberDiff line change
@@ -704,4 +704,6 @@ class Server
704704
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
705705
};
706706

707+
void ServerScheduleFactoryReset();
708+
707709
} // namespace chip

‎src/lib/shell/commands/BUILD.gn

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ source_set("commands") {
6565
}
6666

6767
if (chip_device_platform != "none") {
68-
public_deps += [ "${chip_root}/src/app/server" ]
6968
public_deps += [ "${chip_root}/src/app/onboarding-codes-utils" ]
7069
}
7170

‎src/lib/shell/commands/Device.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include <app/server/Server.h>
1918
#include <lib/shell/Commands.h>
2019
#include <lib/shell/Engine.h>
2120
#include <lib/shell/SubShellCommand.h>
2221
#include <lib/support/CodeUtils.h>
2322
#include <platform/CHIPDeviceLayer.h>
2423

2524
namespace chip {
25+
26+
void ServerScheduleFactoryReset();
27+
2628
namespace Shell {
2729

2830
static CHIP_ERROR FactoryResetHandler(int argc, char ** argv)
@@ -31,7 +33,7 @@ static CHIP_ERROR FactoryResetHandler(int argc, char ** argv)
3133
#if CHIP_CONFIG_TEST
3234
DeviceLayer::ConfigurationMgr().InitiateFactoryReset();
3335
#else
34-
chip::Server::GetInstance().ScheduleFactoryReset();
36+
ServerScheduleFactoryReset();
3537
#endif // CHIP_TEST
3638
return CHIP_NO_ERROR;
3739
}

0 commit comments

Comments
 (0)