Skip to content

Commit 0ef6c4e

Browse files
authored
Merge branch 'master' into chime-fix
2 parents 4a35ca5 + b10a85a commit 0ef6c4e

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

examples/platform/linux/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ source_set("app-main") {
108108
":wifi-diagnostics-test-event-trigger",
109109
"${chip_root}/src/data-model-providers/codegen:instance-header",
110110
"${chip_root}/src/lib",
111-
"${chip_root}/src/platform/logging:default",
111+
"${chip_root}/src/platform/logging:stdio",
112112
]
113113
deps = [
114114
":ota-test-event-trigger",

scripts/build/clang_coverage_wrapper.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
import logging
17+
import os
18+
import sys
1719

1820
import click
1921
import coloredlogs
@@ -80,9 +82,16 @@ def main(log_level, no_log_timestamps, output, raw_profile_filename):
8082
log_fmt = "%(levelname)-7s %(message)s"
8183
coloredlogs.install(level=__LOG_LEVELS__[log_level], fmt=log_fmt)
8284

85+
expected_output = jinja2.Template(_CPP_TEMPLATE).render(raw_profile_filename=raw_profile_filename)
86+
if os.path.exists(output):
87+
with open(output, 'rt') as f:
88+
if f.read() == expected_output:
89+
logging.info("File %s is already as expected. Will not re-write", output)
90+
sys.exit(0)
91+
8392
logging.info("Writing output to %s (profile name: %s)", output, raw_profile_filename)
8493
with open(output, "wt") as f:
85-
f.write(jinja2.Template(_CPP_TEMPLATE).render(raw_profile_filename=raw_profile_filename))
94+
f.write(expected_output)
8695

8796
logging.debug("Writing completed")
8897

src/app/AttributePathExpandIterator.h

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <lib/core/DataModelTypes.h>
2626
#include <lib/support/LinkedList.h>
2727
#include <lib/support/Span.h>
28-
#include <messaging/ExchangeContext.h>
2928

3029
#include <limits>
3130

src/darwin/Framework/CHIP/MTRDevice_Concrete.mm

+10-1
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,8 @@ - (void)_scheduleNextUpdate:(UInt64)nextUpdateInSeconds
708708
{
709709
mtr_weakify(self);
710710
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (nextUpdateInSeconds * NSEC_PER_SEC)), self.queue, ^{
711-
MTR_LOG_DEBUG("%@ Timer expired, start Device Time Update", self);
712711
mtr_strongify(self);
712+
MTR_LOG_DEBUG("%@ Timer expired, start Device Time Update", self);
713713
if (self) {
714714
[self _performScheduledTimeUpdate];
715715
} else {
@@ -3659,8 +3659,12 @@ - (void)invokeCommands:(NSArray<NSArray<MTRCommandWithRequiredResponse *> *> *)c
36593659
for (NSArray<MTRCommandWithRequiredResponse *> * commandGroup in [commands reverseObjectEnumerator]) {
36603660
// We want to invoke all the commands in the group in order, propagating along the list of
36613661
// current responses. Build up that linked list of command invokes via chaining the completions.
3662+
mtr_weakify(self);
36623663
for (MTRCommandWithRequiredResponse * command in [commandGroup reverseObjectEnumerator]) {
36633664
auto commandInvokeBlock = ^(BOOL allSucceededSoFar, NSArray<MTRDeviceResponseValueDictionary> * previousResponses) {
3665+
mtr_strongify(self);
3666+
VerifyOrReturn(self, MTR_LOG_DEBUG("invokeCommands commandInvokeBlock called back with nil MTRDevice"));
3667+
36643668
[self invokeCommandWithEndpointID:command.path.endpoint
36653669
clusterID:command.path.cluster
36663670
commandID:command.path.command
@@ -3669,6 +3673,8 @@ - (void)invokeCommands:(NSArray<NSArray<MTRCommandWithRequiredResponse *> *> *)c
36693673
expectedValueInterval:nil
36703674
queue:self.queue
36713675
completion:^(NSArray<NSDictionary<NSString *, id> *> * responses, NSError * error) {
3676+
mtr_strongify(self);
3677+
VerifyOrReturn(self, MTR_LOG_DEBUG("invokeCommands invokeCommandWithEndpointID completion called back with nil MTRDevice"));
36723678
if (error != nil) {
36733679
nextCompletion(NO, [previousResponses arrayByAddingObject:@ {
36743680
MTRCommandPathKey : command.path,
@@ -3701,6 +3707,9 @@ - (void)invokeCommands:(NSArray<NSArray<MTRCommandWithRequiredResponse *> *> *)c
37013707
}
37023708

37033709
auto commandGroupInvokeBlock = ^(BOOL allSucceededSoFar, NSArray<MTRDeviceResponseValueDictionary> * previousResponses) {
3710+
mtr_strongify(self);
3711+
VerifyOrReturn(self, MTR_LOG_DEBUG("invokeCommands commandGroupInvokeBlock called back with nil MTRDevice"));
3712+
37043713
if (allSucceededSoFar == NO) {
37053714
// Don't start a new command group if something failed in the
37063715
// previous one. Note that we might be running on self.queue here, so make sure we

0 commit comments

Comments
 (0)