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_);
 | 
			
		||||
        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));
 | 
			
		||||
#else
 | 
			
		||||
                    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<DownClientInfo>();
 | 
			
		||||
                    task_list_[index]->id = id;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (num < 20) {
 | 
			
		||||
                    mpdebug("*****************************************");
 | 
			
		||||
                    mpinfo("{}", real);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (num >= 20) {
 | 
			
		||||
            mpwarn("Too Many Files [{}], Only Display 20.", num);
 | 
			
		||||
        }
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
    // 能接收到 TRANS 一定是客户端(这里不是指Server)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user