Skip to content

Commit

Permalink
fix linux compiler warning & bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Mar 31, 2020
1 parent 606c7e3 commit 54830dd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions NodeServer/CommandStart.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ inline ServerCommand::ExeStatus CommandStart::canExecute(string& sResult)

inline bool CommandStart::startByScript(string& sResult)
{
int64_t iPid = -1;
// int64_t iPid = -1;
bool bSucc = false;
string sStartScript = _serverObjectPtr->getStartScript();
string sMonitorScript = _serverObjectPtr->getMonitorScript();

string sServerId = _serverObjectPtr->getServerId();
iPid = _serverObjectPtr->getActivator()->activate(sStartScript, sMonitorScript, sResult);
_serverObjectPtr->getActivator()->activate(sStartScript, sMonitorScript, sResult);

// vector<string> vtServerName = TC_Common::sepstr<string>(sServerId, ".");
// if (vtServerName.size() != 2)
Expand Down
2 changes: 1 addition & 1 deletion NodeServer/ServerObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ void ServerObject::doMonScript()
}
}
}
else
else if(_startScript.empty() || isTarsServer() == false)
{
int64_t pid = savePid();
if(pid >= 0)
Expand Down
2 changes: 1 addition & 1 deletion NodeServer/ServerObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ class ServerObject : public TC_ThreadRecLock, public TC_HandleBase
PatchInfo _patchInfo; //下载信息

private:
int64_t _pid; //服务进程号
int64_t _pid; //服务进程号
string _version; //TARS版本
NodeInfo _nodeInfo; //服务所在node信息
TC_Endpoint _localEndpoint; //本地socket
Expand Down
7 changes: 6 additions & 1 deletion deploy/tars-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,12 @@ fi

LOG_INFO "copy framework to install path"

${TARS_PATH}/tarsnode/util/stop.bat
if [ $OS == 3 ]; then
if [ -f ${TARS_PATH}/tarsnode/util/stop.bat ]; then
${TARS_PATH}/tarsnode/util/stop.bat
fi
fi

sleep 1
for var in $TARS;
do
Expand Down
4 changes: 4 additions & 0 deletions tars-client/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

include_directories(${CMAKE_SOURCE_DIR}/tarscpp/util/include)

if(WIN32)
include_directories(${CMAKE_SOURCE_DIR}/tarscpp/util/src/epoll_windows)
endif(WIN32)

include_directories(${CMAKE_SOURCE_DIR}/tarscpp/servant/protocol)

set(MODULE tars-client)
Expand Down

0 comments on commit 54830dd

Please sign in to comment.