From 84cf2b44deab211d3b16348ff42f9d4577ae228c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Sat, 24 Oct 2020 17:39:30 -0400 Subject: [PATCH] data_transfer: cleanup Change-Id: Id4a3cb459956827b472d41c0458dc0b85231f7c9 --- src/data_transfer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data_transfer.cpp b/src/data_transfer.cpp index ee3a1a7d3b..d4c78dda64 100644 --- a/src/data_transfer.cpp +++ b/src/data_transfer.cpp @@ -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_) -- GitLab