Skip to content

Commit cfcf399

Browse files
restyled-commitsyunhanw-google
authored andcommitted
Restyled by clang-format
1 parent 5226243 commit cfcf399

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/app/InteractionModelEngine.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1077,8 +1077,7 @@ void InteractionModelEngine::OnActiveModeNotification(ScopedNodeId aCheckInNode,
10771077
// It is possible that pListItem is destroyed by the app in OnActiveModeNotification.
10781078
// Get the next item before invoking `OnActiveModeNotification`.
10791079
if (ScopedNodeId(pListItem->GetPeerNodeId(), pListItem->GetFabricIndex()) == aPeer &&
1080-
pListItem->GetLocalScopedNodeId().HasValue() &&
1081-
aCheckInNode == pListItem->GetLocalScopedNodeId().Value())
1080+
pListItem->GetLocalScopedNodeId().HasValue() && aCheckInNode == pListItem->GetLocalScopedNodeId().Value())
10821081
{
10831082
pListItem->OnActiveModeNotification();
10841083
}

src/app/ReadClient.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ void ReadClient::OnActiveModeNotification()
486486
{
487487
VerifyOrDie(mpImEngine->InActiveReadClientList(this));
488488

489-
// Note: this API only works when issuing subscription via SendAutoResubscribeRequest, when SendAutoResubscribeRequest is called,
490-
// either mEventPathParamsListSize or mAttributePathParamsListSize is not 0.
489+
// Note: this API only works when issuing subscription via SendAutoResubscribeRequest, when SendAutoResubscribeRequest is
490+
// called, either mEventPathParamsListSize or mAttributePathParamsListSize is not 0.
491491
VerifyOrDie(mReadPrepareParams.mEventPathParamsListSize != 0 || mReadPrepareParams.mAttributePathParamsListSize != 0);
492492

493493
// When we reach here, the subscription definitely exceeded the liveness timeout. Just continue the unfinished resubscription
@@ -498,8 +498,9 @@ void ReadClient::OnActiveModeNotification()
498498
return;
499499
}
500500

501-
// If the server sends out check-in message, and there is no reschedule subscription yet in client side at the same time, it means
502-
// current client does not realize subscription has gone, and we should forcibly timeout current subscription, and schedule a new one.
501+
// If the server sends out check-in message, and there is no reschedule subscription yet in client side at the same time, it
502+
// means current client does not realize subscription has gone, and we should forcibly timeout current subscription, and
503+
// schedule a new one.
503504
if (!mIsResubscriptionScheduled)
504505
{
505506
// Closing will ultimately trigger ScheduleResubscription with the aReestablishCASE argument set to true, effectively
@@ -508,8 +509,8 @@ void ReadClient::OnActiveModeNotification()
508509
return;
509510
}
510511

511-
// If the server sends a check-in message and a subscription is already scheduled, it indicates a client-side subscription timeout or failure.
512-
// Cancel the scheduled subscription and initiate a new one immediately.
512+
// If the server sends a check-in message and a subscription is already scheduled, it indicates a client-side subscription
513+
// timeout or failure. Cancel the scheduled subscription and initiate a new one immediately.
513514
TriggerResubscribeIfScheduled("check-in message");
514515
}
515516

src/app/ReadClient.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ class ReadClient : public Messaging::ExchangeDelegate
358358
* call this function when a check-in message is received.
359359
*
360360
* If the server sends out check-in message, and there is no reschedule subscription yet in client side at the same time, it
361-
* means current client does not realize subscription has gone, and we should forcibly timeout current subscription, and schedule a new one.
361+
* means current client does not realize subscription has gone, and we should forcibly timeout current subscription, and
362+
* schedule a new one.
362363
*
363364
* This API only works when issuing subscription via SendAutoResubscribeRequest.
364365
*/
@@ -508,7 +509,6 @@ class ReadClient : public Messaging::ExchangeDelegate
508509
*/
509510
Optional<System::Clock::Timeout> GetSubscriptionTimeout();
510511

511-
512512
Optional<ScopedNodeId> GetLocalScopedNodeId() const
513513
{
514514
VerifyOrReturnValue(mReadPrepareParams.mSessionHolder, NullOptional);

src/controller/tests/data_model/TestRead.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -2329,8 +2329,8 @@ TEST_F(TestRead, TestSubscribe_OnActiveModeNotification)
23292329

23302330
GetLoopback().mNumMessagesToDrop = 0;
23312331
callback.ClearCounters();
2332-
InteractionModelEngine::GetInstance()->OnActiveModeNotification(readClient.GetLocalScopedNodeId().Value(),
2333-
ScopedNodeId(readClient.GetPeerNodeId(), readClient.GetFabricIndex()));
2332+
InteractionModelEngine::GetInstance()->OnActiveModeNotification(
2333+
readClient.GetLocalScopedNodeId().Value(), ScopedNodeId(readClient.GetPeerNodeId(), readClient.GetFabricIndex()));
23342334
EXPECT_EQ(callback.mOnResubscriptionsAttempted, 1);
23352335
EXPECT_EQ(callback.mLastError, CHIP_ERROR_TIMEOUT);
23362336

@@ -2392,8 +2392,8 @@ TEST_F(TestRead, TestSubscribeFailed_OnActiveModeNotification)
23922392

23932393
GetLoopback().mNumMessagesToDrop = 0;
23942394
callback.ClearCounters();
2395-
InteractionModelEngine::GetInstance()->OnActiveModeNotification(readClient.GetLocalScopedNodeId().Value(),
2396-
ScopedNodeId(readClient.GetPeerNodeId(), readClient.GetFabricIndex()));
2395+
InteractionModelEngine::GetInstance()->OnActiveModeNotification(
2396+
readClient.GetLocalScopedNodeId().Value(), ScopedNodeId(readClient.GetPeerNodeId(), readClient.GetFabricIndex()));
23972397
//
23982398
// Drive servicing IO till we have established a subscription.
23992399
//

0 commit comments

Comments
 (0)