Skip to content
Snippets Groups Projects
Commit 2d653ee5 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

data_transfer: directly pass the buffer

Change-Id: I62f93b4b0706863debc9595b0b4646c3b0974b52
parent 0e6cc9c1
Branches
No related tags found
No related merge requests found
...@@ -835,7 +835,7 @@ IncomingFile::process() ...@@ -835,7 +835,7 @@ IncomingFile::process()
channel_->setOnRecv([w = weak()](const uint8_t* buf, size_t len) { channel_->setOnRecv([w = weak()](const uint8_t* buf, size_t len) {
if (auto shared = w.lock()) { if (auto shared = w.lock()) {
if (shared->stream_.is_open()) if (shared->stream_.is_open())
shared->stream_ << std::string_view((const char*) buf, len); shared->stream_.write(reinterpret_cast<const char*>(buf), len);
shared->info_.bytesProgress = shared->stream_.tellp(); shared->info_.bytesProgress = shared->stream_.tellp();
} }
return len; return len;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment