update:更新子模块。

This commit is contained in:
taynpg 2025-01-14 12:46:42 +08:00
parent 2fa0b0db48
commit 899139012b
5 changed files with 8 additions and 8 deletions

View File

@ -204,7 +204,7 @@ bool CClient::up_task(const std::string& param)
} }
#ifdef _WIN32 #ifdef _WIN32
msg = CCodec::GBKTou8(msg); msg = CCodec::ansi_to_u8(msg);
#endif #endif
std::shared_ptr<CFrameBuffer> buf = std::make_shared<CFrameBuffer>(); std::shared_ptr<CFrameBuffer> buf = std::make_shared<CFrameBuffer>();
@ -235,7 +235,7 @@ bool CClient::down_one_file(const std::string& id, const std::string& file, cons
{ {
down_->cur_remote_id_ = id; down_->cur_remote_id_ = id;
#ifdef _WIN32 #ifdef _WIN32
down_->cur_remote_file_ = CCodec::u8ToGBK(file); down_->cur_remote_file_ = CCodec::u8_to_ansi(file);
#else #else
down_->cur_remote_file_ = file; down_->cur_remote_file_ = file;
#endif #endif
@ -492,7 +492,7 @@ void CClient::handle_frame(CFrameBuffer* buf)
} }
if (real.find("[") == std::string::npos) { if (real.find("[") == std::string::npos) {
#ifdef _WIN32 #ifdef _WIN32
logger_->info("FILE ==> {}", CCodec::u8ToGBK(real)); logger_->info("FILE ==> {}", CCodec::u8_to_ansi(real));
#else #else
logger_->info("FILE ==> {}", real); logger_->info("FILE ==> {}", real);
#endif #endif
@ -542,7 +542,7 @@ void CClient::handle_frame(CFrameBuffer* buf)
std::lock_guard<std::mutex> lock(mutex_); std::lock_guard<std::mutex> lock(mutex_);
up_[buf->fid_] = std::make_shared<TransInfomation>(); up_[buf->fid_] = std::make_shared<TransInfomation>();
#ifdef _WIN32 #ifdef _WIN32
up_[buf->fid_]->cur_file_ = CCodec::u8ToGBK(std::string(buf->data_, buf->len_)); up_[buf->fid_]->cur_file_ = CCodec::u8_to_ansi(std::string(buf->data_, buf->len_));
#else #else
up_[buf->fid_]->cur_file_ = std::string(buf->data_, buf->len_); up_[buf->fid_]->cur_file_ = std::string(buf->data_, buf->len_);
#endif #endif

View File

@ -10,5 +10,5 @@ set(SOURCES
net_base.h net_base.cpp net_base.h net_base.cpp
) )
add_library(trans_net STATIC ${SOURCES}) add_library(trans_net STATIC ${SOURCES})
target_link_libraries(trans_net PUBLIC Ofen trans_util) target_link_libraries(trans_net PUBLIC ofen trans_util)
target_include_directories(trans_net PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(trans_net PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

2
ofen

@ -1 +1 @@
Subproject commit c2fb5d6ed2bac563cd8db76a368d6269ecfb19dd Subproject commit 2be0e9631729cf85e79b23fb921209182e0907be

View File

@ -131,7 +131,7 @@ void CTcpServer::trans_data(CFrameBuffer* buf)
case TYPE_UP_LIST: { case TYPE_UP_LIST: {
std::string files_path = std::string(buf->data_, buf->len_); std::string files_path = std::string(buf->data_, buf->len_);
#ifdef _WIN32 #ifdef _WIN32
std::string turn_files_path = CCodec::u8ToGBK(files_path); std::string turn_files_path = CCodec::u8_to_ansi(files_path);
#else #else
std::string turn_files_path(files_path); std::string turn_files_path(files_path);
#endif #endif

View File

@ -9,5 +9,5 @@ endif()
set(SOURCES util.h util.cpp) set(SOURCES util.h util.cpp)
add_library(trans_util STATIC ${SOURCES}) add_library(trans_util STATIC ${SOURCES})
target_link_libraries(trans_util PUBLIC Ofen) target_link_libraries(trans_util PUBLIC ofen)
target_include_directories(trans_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(trans_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})