From b683a05deafbc8c94babb12717844dac2bc60e63 Mon Sep 17 00:00:00 2001 From: taynpg Date: Thu, 13 Feb 2025 18:09:40 +0800 Subject: [PATCH] =?UTF-8?q?print=EF=BC=9A=E5=A4=9A=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=8E=A5=E6=94=B6=E7=AB=AF=E4=B8=8D=E5=85=A8=E9=83=A8=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/client/client.cpp b/client/client.cpp index b66e1bf..2a78e27 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -531,18 +531,22 @@ void CClient::handle_frame(CFrameBuffer* buf) std::string source(buf->data_, buf->len_); auto vec = COfStr::split(source, "\n"); int index = -1; + size_t num = 0; for (const auto& item : vec) { std::string real = COfStr::trim(item); if (real.empty()) { continue; } if (real.find('[') == std::string::npos) { + if (num < 20) { #ifdef _WIN32 - mpinfo("FILE ==> {}", CCodec::u8_to_ansi(real)); + mpinfo("FILE ==> {}", CCodec::u8_to_ansi(real)); #else - mpinfo("FILE ==> {}", real); + mpinfo("FILE ==> {}", real); #endif + } task_list_[index]->files.push_back(real); + ++num; } else { auto a = real.find_first_of('[') + 1; auto b = real.find_first_of(']'); @@ -559,11 +563,15 @@ void CClient::handle_frame(CFrameBuffer* buf) task_list_[index] = std::make_shared(); task_list_[index]->id = id; } - - mpdebug("*****************************************"); - mpinfo("{}", real); + if (num < 20) { + mpdebug("*****************************************"); + mpinfo("{}", real); + } } } + if (num >= 20) { + mpwarn("Too Many Files [{}], Only Display 20.", num); + } break; } // 能接收到 TRANS 一定是客户端(这里不是指Server)