print:多文件接收端不全部打印。
This commit is contained in:
parent
6efb34f046
commit
b683a05dea
@ -531,18 +531,22 @@ void CClient::handle_frame(CFrameBuffer* buf)
|
|||||||
std::string source(buf->data_, buf->len_);
|
std::string source(buf->data_, buf->len_);
|
||||||
auto vec = COfStr::split(source, "\n");
|
auto vec = COfStr::split(source, "\n");
|
||||||
int index = -1;
|
int index = -1;
|
||||||
|
size_t num = 0;
|
||||||
for (const auto& item : vec) {
|
for (const auto& item : vec) {
|
||||||
std::string real = COfStr::trim(item);
|
std::string real = COfStr::trim(item);
|
||||||
if (real.empty()) {
|
if (real.empty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (real.find('[') == std::string::npos) {
|
if (real.find('[') == std::string::npos) {
|
||||||
|
if (num < 20) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
mpinfo("FILE ==> {}", CCodec::u8_to_ansi(real));
|
mpinfo("FILE ==> {}", CCodec::u8_to_ansi(real));
|
||||||
#else
|
#else
|
||||||
mpinfo("FILE ==> {}", real);
|
mpinfo("FILE ==> {}", real);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
task_list_[index]->files.push_back(real);
|
task_list_[index]->files.push_back(real);
|
||||||
|
++num;
|
||||||
} else {
|
} else {
|
||||||
auto a = real.find_first_of('[') + 1;
|
auto a = real.find_first_of('[') + 1;
|
||||||
auto b = real.find_first_of(']');
|
auto b = real.find_first_of(']');
|
||||||
@ -559,11 +563,15 @@ void CClient::handle_frame(CFrameBuffer* buf)
|
|||||||
task_list_[index] = std::make_shared<DownClientInfo>();
|
task_list_[index] = std::make_shared<DownClientInfo>();
|
||||||
task_list_[index]->id = id;
|
task_list_[index]->id = id;
|
||||||
}
|
}
|
||||||
|
if (num < 20) {
|
||||||
mpdebug("*****************************************");
|
mpdebug("*****************************************");
|
||||||
mpinfo("{}", real);
|
mpinfo("{}", real);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (num >= 20) {
|
||||||
|
mpwarn("Too Many Files [{}], Only Display 20.", num);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 能接收到 TRANS 一定是客户端(这里不是指Server)
|
// 能接收到 TRANS 一定是客户端(这里不是指Server)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user