Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and amitnj committed Aug 30, 2022
1 parent 1a28c47 commit ae01dac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
15 changes: 8 additions & 7 deletions src/app/app-platform/ContentAppPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ EndpointId ContentAppPlatform::AddContentApp(ContentApp * app, EmberAfEndpointTy
EmberAfStatus ret;
EndpointId initEndpointId = mCurrentEndpointId;

do {
do
{
ret = emberAfSetDynamicEndpoint(index, mCurrentEndpointId, ep, dataVersionStorage, deviceTypeList);
if (ret == EMBER_ZCL_STATUS_SUCCESS)
{
ChipLogProgress(DeviceLayer, "Added ContentApp %s to dynamic endpoint %d (index=%d)",
vendorApp.applicationId, mCurrentEndpointId, index);
ChipLogProgress(DeviceLayer, "Added ContentApp %s to dynamic endpoint %d (index=%d)", vendorApp.applicationId,
mCurrentEndpointId, index);
app->SetEndpointId(mCurrentEndpointId);
IncrementCurrentEndpointID();
return app->GetEndpointId();
Expand All @@ -135,8 +136,7 @@ EndpointId ContentAppPlatform::AddContentApp(ContentApp * app, EmberAfEndpointTy
return kNoCurrentEndpointId;
}
IncrementCurrentEndpointID();
}
while (initEndpointId != mCurrentEndpointId);
} while (initEndpointId != mCurrentEndpointId);
ChipLogError(DeviceLayer, "Failed to add dynamic endpoint: No endpoints available!");
return kNoCurrentEndpointId;
}
Expand Down Expand Up @@ -165,7 +165,8 @@ EndpointId ContentAppPlatform::AddContentApp(ContentApp * app, EmberAfEndpointTy
index++;
}

if (desiredEndpointId < FIXED_ENDPOINT_COUNT || emberAfGetDynamicIndexFromEndpoint(desiredEndpointId) != kEmberInvalidEndpointIndex)
if (desiredEndpointId < FIXED_ENDPOINT_COUNT ||
emberAfGetDynamicIndexFromEndpoint(desiredEndpointId) != kEmberInvalidEndpointIndex)
{
// invalid desiredEndpointId
ChipLogError(DeviceLayer, "Failed to add dynamic endpoint: desired endpointID is invalid!");
Expand All @@ -181,7 +182,7 @@ EndpointId ContentAppPlatform::AddContentApp(ContentApp * app, EmberAfEndpointTy
continue;
}
mContentApps[index] = app;
EmberAfStatus ret = emberAfSetDynamicEndpoint(index, desiredEndpointId, ep, dataVersionStorage, deviceTypeList);
EmberAfStatus ret = emberAfSetDynamicEndpoint(index, desiredEndpointId, ep, dataVersionStorage, deviceTypeList);
if (ret != EMBER_ZCL_STATUS_SUCCESS)
{
ChipLogError(DeviceLayer, "Adding ContentApp error=%d", ret);
Expand Down
1 change: 0 additions & 1 deletion src/app/app-platform/ContentAppPlatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ class DLL_EXPORT ContentAppPlatform

private:
void IncrementCurrentEndpointID();

};

} // namespace AppPlatform
Expand Down

0 comments on commit ae01dac

Please sign in to comment.