From aa4c502f9941f742a3affc781c375bda8f5d6e81 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Sat, 10 Apr 2021 15:32:40 -0700 Subject: [PATCH] fix build errors --- examples/all-clusters-app/all-clusters-common/BUILD.gn | 2 ++ examples/lock-app/lock-common/BUILD.gn | 2 ++ src/messaging/ExchangeDelegate.h | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/all-clusters-app/all-clusters-common/BUILD.gn b/examples/all-clusters-app/all-clusters-common/BUILD.gn index c3d3ed724bac41..e6451192a0311c 100644 --- a/examples/all-clusters-app/all-clusters-common/BUILD.gn +++ b/examples/all-clusters-app/all-clusters-common/BUILD.gn @@ -17,6 +17,8 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/app/chip_data_model.gni") chip_data_model("all-clusters-common") { + public_deps = [ "${chip_root}/src/protocols/secure_channel" ] + cluster_sources = [ "account-login-server", "application-launcher-server", diff --git a/examples/lock-app/lock-common/BUILD.gn b/examples/lock-app/lock-common/BUILD.gn index 61d7675bc5cadf..a755aee390657e 100644 --- a/examples/lock-app/lock-common/BUILD.gn +++ b/examples/lock-app/lock-common/BUILD.gn @@ -17,6 +17,8 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/app/chip_data_model.gni") chip_data_model("lock-common") { + public_deps = [ "${chip_root}/src/protocols/secure_channel" ] + cluster_sources = [ "bindings", "network-commissioning", diff --git a/src/messaging/ExchangeDelegate.h b/src/messaging/ExchangeDelegate.h index f8c4ca000eaaf8..323ab94427d4c1 100644 --- a/src/messaging/ExchangeDelegate.h +++ b/src/messaging/ExchangeDelegate.h @@ -80,7 +80,10 @@ class DLL_EXPORT ExchangeDelegate virtual ExchangeTransport * AllocTransport(ReliableMessageMgr * rmMgr, SecureSessionMgr * sessionMgr) { ApplicationExchangeTransport * transport = chip::Platform::New(); - transport->Init(rmMgr, sessionMgr); + if (transport != nullptr) + { + transport->Init(rmMgr, sessionMgr); + } return transport; }