Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

while convenient, we should not do a synchronous block write in our example appl... #9858

Closed
todo bot opened this issue Sep 21, 2021 · 1 comment
Closed
Assignees
Labels

Comments

@todo
Copy link

todo bot commented Sep 21, 2021

// TODO: while convenient, we should not do a synchronous block write in our example application - this is bad practice
std::ofstream otaFile(outFilePath, std::ifstream::out | std::ifstream::ate | std::ifstream::app);
otaFile.write(reinterpret_cast<const char *>(event.blockdata.Data), event.blockdata.Length);
if (event.blockdata.IsEof)
{
err = mTransfer.PrepareBlockAck();
VerifyOrReturn(err == CHIP_NO_ERROR,
ChipLogError(BDX, "%s: PrepareBlockAck failed: %s", __FUNCTION__, chip::ErrorStr(err)));
mIsTransferComplete = true;
}


This issue was generated by todo based on a TODO comment in 36de151 when #9740 was merged. cc @holbrookt.
@todo todo bot added the todo label Sep 21, 2021
@todo todo bot assigned holbrookt Sep 21, 2021
@carol-apple
Copy link
Contributor

This is a dupe of #9860

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants