diff --git a/client/client.cpp b/client/client.cpp index e776ed0..8383db0 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -272,7 +272,7 @@ bool CClient::down_one_file(const std::string& id, const std::string& file, cons down_->trans_state_ = TRANS_REDAY; cur_down_size_ = 0; float percent = 0.0; - disable_cur(); + fc_disable_cur(); while (down_->trans_state_ != TRANS_DONE && down_->trans_state_ != TRANS_FAILED) { std::this_thread::sleep_for(std::chrono::milliseconds(down_check_wait)); if (cur_file_size_ > 0) { @@ -289,7 +289,7 @@ bool CClient::down_one_file(const std::string& id, const std::string& file, cons percent = (float)cur_down_size_ / cur_file_size_; CTransProtocal::display_progress(percent); } - enable_cur(); + fc_enable_cur(); if (cur_down_size_ > 0 && cur_file_size_ == cur_down_size_) { mpwarn("down one file success, total:[{}/{}]", cur_down_size_, cur_file_size_); return true; diff --git a/filecomplete b/filecomplete index f6a975b..0c566d0 160000 --- a/filecomplete +++ b/filecomplete @@ -1 +1 @@ -Subproject commit f6a975b9848e6f2e989befec1681c422df931b28 +Subproject commit 0c566d0b0a3c9b00d0b22f8e1e3a146a7f1482e0 diff --git a/util/util.h b/util/util.h index a3bdbbc..774cd73 100644 --- a/util/util.h +++ b/util/util.h @@ -94,25 +94,25 @@ inline std::string now_str() template void mpdebug(const std::string& format, Args&&... args) { - lock_print(); + fc_lock_print(); fmt::print(fg(fmt::color::steel_blue), now_str() + format + "\n", std::forward(args)...); - unlock_print(); + fc_unlock_print(); } template void mpinfo(const std::string& format, Args&&... args) { - lock_print(); + fc_lock_print(); fmt::print(fg(static_cast(0x0EA113)), now_str() + format + "\n", std::forward(args)...); - unlock_print(); + fc_unlock_print(); } template void mpwarn(const std::string& format, Args&&... args) { - lock_print(); + fc_lock_print(); fmt::print(fg(fmt::color::yellow_green), now_str() + format + "\n", std::forward(args)...); - unlock_print(); + fc_unlock_print(); } template void mperror(const std::string& format, Args&&... args) { - lock_print(); + fc_lock_print(); fmt::print(fg(fmt::color::orange_red), now_str() + format + "\n", std::forward(args)...); - unlock_print(); + fc_unlock_print(); } \ No newline at end of file