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
msg = CCodec::GBKTou8(msg);
msg = CCodec::ansi_to_u8(msg);
#endif
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;
#ifdef _WIN32
down_->cur_remote_file_ = CCodec::u8ToGBK(file);
down_->cur_remote_file_ = CCodec::u8_to_ansi(file);
#else
down_->cur_remote_file_ = file;
#endif
@ -492,7 +492,7 @@ void CClient::handle_frame(CFrameBuffer* buf)
}
if (real.find("[") == std::string::npos) {
#ifdef _WIN32
logger_->info("FILE ==> {}", CCodec::u8ToGBK(real));
logger_->info("FILE ==> {}", CCodec::u8_to_ansi(real));
#else
logger_->info("FILE ==> {}", real);
#endif
@ -542,7 +542,7 @@ void CClient::handle_frame(CFrameBuffer* buf)
std::lock_guard<std::mutex> lock(mutex_);
up_[buf->fid_] = std::make_shared<TransInfomation>();
#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
up_[buf->fid_]->cur_file_ = std::string(buf->data_, buf->len_);
#endif

View File

@ -10,5 +10,5 @@ set(SOURCES
net_base.h net_base.cpp
)
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})

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: {
std::string files_path = std::string(buf->data_, buf->len_);
#ifdef _WIN32
std::string turn_files_path = CCodec::u8ToGBK(files_path);
std::string turn_files_path = CCodec::u8_to_ansi(files_path);
#else
std::string turn_files_path(files_path);
#endif

View File

@ -9,5 +9,5 @@ endif()
set(SOURCES util.h util.cpp)
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})