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)