Skip to content
Snippets Groups Projects
Commit 84cf2b44 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

data_transfer: cleanup

Change-Id: Id4a3cb459956827b472d41c0458dc0b85231f7c9
parent 256a94c2
No related branches found
No related tags found
No related merge requests found
......@@ -329,10 +329,10 @@ private:
{
dht::ThreadPool::computation().run([this]() {
while (!input_.eof() && onRecvCb_) {
std::vector<uint8_t> buf;
std::vector<char> buf;
buf.resize(MAX_BUFFER_SIZE);
input_.read(reinterpret_cast<char*>(&buf[0]), buf.size());
input_.read(&buf[0], buf.size());
buf.resize(input_.gcount());
if (buf.size()) {
std::lock_guard<std::mutex> lk {infoMutex_};
......@@ -340,7 +340,7 @@ private:
metaInfo_->updateInfo(info_);
}
if (onRecvCb_)
onRecvCb_(std::string_view((const char*)buf.data(), buf.size()));
onRecvCb_(std::string_view(buf.data(), buf.size()));
}
JAMI_DBG() << "FTP#" << getId() << ": sent " << info_.bytesProgress << " bytes";
if (internalCompletionCb_)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment