Skip to content

Commit

Permalink
fix compiler bug in tarscpp v3.0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Apr 30, 2024
1 parent 1838c22 commit b9251e9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ endif()

include_directories(/usr/local/tars/cpp/thirdparty/include)
link_directories(/usr/local/tars/cpp/thirdparty/lib)
if(LINUX)
link_directories(/lib/x86_64-linux-gnu)
endif()

add_subdirectory(src)
add_subdirectory(test)
Expand Down
6 changes: 3 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ set(CMAKE_BUILD_TYPE "Debug")

gen_server("Base" "GatewayServer")

target_link_libraries(GatewayServer mysqlclient dl)
# target_link_libraries(GatewayServer mysqlclient dl)

# if(UNIX AND NOT APPLE)
# target_link_libraries(GatewayServer -static-libgcc -static-libstdc++)
# if(LINUX)
# target_link_libraries(GatewayServer -static-libgcc -static-libstdc++)
# endif()
2 changes: 1 addition & 1 deletion src/tupproxy/TupBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ void TupBase::tupAsyncCall(const shared_ptr<RequestPacket> &tup, ServantPrx prox
_trace_param_ = "{\"trace_param_over_max_len\":true, \"data_len\":" + TC_Common::tostr(tup->sBuffer.size()) + "}";
}

TARS_TRACE(traceKey, TRACE_ANNOTATION_TS, ServerConfig::Application + "." + ServerConfig::ServerName, tup->sServantName, tup->sFuncName, 0, _trace_param_, "");
TARS_TRACE(traceKey, TRACE_ANNOTATION_TS, ServerConfig::Application + "." + ServerConfig::ServerName, tup->sServantName, tup->sFuncName.c_str(), 0, _trace_param_, "");
TLOG_DEBUG("trace===>" << traceKey << ", " << tup->sServantName << ":" << tup->sFuncName << endl);

cb->setTraceKey(traceKey);
Expand Down
2 changes: 1 addition & 1 deletion src/tupproxy/TupCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int TupCallback::onDispatch(ReqMessagePtr msg)
_trace_param_ = "{\"trace_param_over_max_len\":true, \"data_len\":" + TC_Common::tostr(msg->response->sBuffer.size()) + "}";
}

TARS_TRACE(getTraceKey(), TRACE_ANNOTATION_TE, ServerConfig::Application + "." + ServerConfig::ServerName, _stParam->sServantName, _stParam->sFuncName, msg->response->iRet, _trace_param_, "");
TARS_TRACE(getTraceKey(), TRACE_ANNOTATION_TE, ServerConfig::Application + "." + ServerConfig::ServerName, _stParam->sServantName, _stParam->sFuncName.c_str(), msg->response->iRet, _trace_param_, "");
}

return 0;
Expand Down

0 comments on commit b9251e9

Please sign in to comment.