Skip to content

Commit

Permalink
Remove test/redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
jtung-apple committed Sep 21, 2023
1 parent ea199a8 commit c1fa475
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ class MTRBaseSubscriptionCallback : public chip::app::ClusterStateCache::Callbac
// be immediately followed by OnDone and we want to do the deletion there.
void ReportError(CHIP_ERROR aError, bool aCancelSubscription = true);

void ReportCurrentData();

// Called at attribute/event report time to queue a block to report on the Matter queue so that for multi-packet reports, this
// block is run and reports in batch. No-op if the block is already queued.
void QueueInterimReport();
Expand Down
11 changes: 0 additions & 11 deletions src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.mm
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,17 @@
return;
}

// __block auto * myself = this;
mInterimReportBlock = dispatch_block_create(DISPATCH_BLOCK_INHERIT_QOS_CLASS, ^{
mInterimReportBlock = nil;
ReportData();
// Allocate reports arrays to continue accumulation
mAttributeReports = [NSMutableArray new];
mEventReports = [NSMutableArray new];
// myself->ReportCurrentData();
});

dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), mInterimReportBlock);
}

void MTRBaseSubscriptionCallback::ReportCurrentData()
{
mInterimReportBlock = nil;
ReportData();
// Allocate reports arrays to continue accumulation
mAttributeReports = [NSMutableArray new];
mEventReports = [NSMutableArray new];
}

void MTRBaseSubscriptionCallback::OnReportEnd()
{
if (mInterimReportBlock) {
Expand Down

0 comments on commit c1fa475

Please sign in to comment.