From f48182404fd707d18f545c70808a76887b94f34e Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 5 Jul 2019 16:41:56 -0700 Subject: [PATCH] modules/media/media: Fix condition variable. modules/media/media: Minor cleanup. --- modules/media/media.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/media/media.cc b/modules/media/media.cc index 3ea78174f..e9df4a769 100644 --- a/modules/media/media.cc +++ b/modules/media/media.cc @@ -188,11 +188,11 @@ try if(!iit.second) { - do + downloading_dock.wait([&room_id] { - downloading_dock.wait(); - } - while(downloading.count(room_id)); + return !downloading.count(room_id); + }); + return room_id; } @@ -420,9 +420,9 @@ read_each_block(const m::room &room, if(at<"type"_>(event) != "ircd.file.block") continue; - const auto &hash + const json::string &hash { - unquote(at<"content"_>(event).at("hash")) + at<"content"_>(event).at("hash") }; const auto &blksz