summaryrefslogtreecommitdiff
path: root/Libraries/LibProtocol
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibProtocol')
-rw-r--r--Libraries/LibProtocol/Client.cpp4
-rw-r--r--Libraries/LibProtocol/Download.cpp6
-rw-r--r--Libraries/LibProtocol/Download.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/Libraries/LibProtocol/Client.cpp b/Libraries/LibProtocol/Client.cpp
index 55c8754c07..2c1973291e 100644
--- a/Libraries/LibProtocol/Client.cpp
+++ b/Libraries/LibProtocol/Client.cpp
@@ -66,9 +66,9 @@ void Client::handle(const Messages::ProtocolClient::DownloadFinished& message)
{
RefPtr<Download> download;
if ((download = m_downloads.get(message.download_id()).value_or(nullptr))) {
- download->did_finish({}, message.success(), message.total_size(), message.shared_buffer_id());
+ download->did_finish({}, message.success(), message.total_size(), message.shbuf_id());
}
- send_sync<Messages::ProtocolServer::DisownSharedBuffer>(message.shared_buffer_id());
+ send_sync<Messages::ProtocolServer::DisownSharedBuffer>(message.shbuf_id());
m_downloads.remove(message.download_id());
}
diff --git a/Libraries/LibProtocol/Download.cpp b/Libraries/LibProtocol/Download.cpp
index 58ce5e050b..1feefba3f2 100644
--- a/Libraries/LibProtocol/Download.cpp
+++ b/Libraries/LibProtocol/Download.cpp
@@ -41,15 +41,15 @@ bool Download::stop()
return m_client->stop_download({}, *this);
}
-void Download::did_finish(Badge<Client>, bool success, u32 total_size, i32 shared_buffer_id)
+void Download::did_finish(Badge<Client>, bool success, u32 total_size, i32 shbuf_id)
{
if (!on_finish)
return;
ByteBuffer payload;
RefPtr<SharedBuffer> shared_buffer;
- if (success && shared_buffer_id != -1) {
- shared_buffer = SharedBuffer::create_from_shared_buffer_id(shared_buffer_id);
+ if (success && shbuf_id != -1) {
+ shared_buffer = SharedBuffer::create_from_shbuf_id(shbuf_id);
payload = ByteBuffer::wrap(shared_buffer->data(), total_size);
}
on_finish(success, payload, move(shared_buffer));
diff --git a/Libraries/LibProtocol/Download.h b/Libraries/LibProtocol/Download.h
index 13b4e27562..b5577800ed 100644
--- a/Libraries/LibProtocol/Download.h
+++ b/Libraries/LibProtocol/Download.h
@@ -49,7 +49,7 @@ public:
Function<void(bool success, const ByteBuffer& payload, RefPtr<SharedBuffer> payload_storage)> on_finish;
Function<void(u32 total_size, u32 downloaded_size)> on_progress;
- void did_finish(Badge<Client>, bool success, u32 total_size, i32 shared_buffer_id);
+ void did_finish(Badge<Client>, bool success, u32 total_size, i32 shbuf_id);
void did_progress(Badge<Client>, u32 total_size, u32 downloaded_size);
private: