int LocalWorker::addNewProcess() { if (( getConfigPointer()->getURL() )&& ( ((LocalWorkerConfig *)getConfigPointer())->getCommand() )) { return startEx(); } return 1; }
int LocalWorker::restart() { setLastRestart( DateTime::s_curTime ); clearCurConnPool(); if (( getConfigPointer()->getURL() )&& ( ((LocalWorkerConfig *)getConfigPointer())->getCommand() )) { removeUnixSocket(); moveToStopList(); return start(); } return 1; }
void LocalWorker::removeUnixSocket() { const GSockAddr &addr = ((LocalWorkerConfig *)getConfigPointer())->getServerAddr(); if (( m_fdApp >= 0 )&&( getPidList()->size() > 0 )&& ( addr.family() == PF_UNIX )) { if ( D_ENABLED( DL_LESS ) ) LOG_D(( "[%s] remove unix socket: %s", getName(), addr.getUnix() )); unlink( addr.getUnix() ); close( m_fdApp ); m_fdApp = -2; getConfigPointer()->altServerAddr(); } }
UINT32 GetFixUp ( OUT VOID ) { AMD_CONFIG_PARAMS* Result; Result = (AMD_CONFIG_PARAMS*) getConfigPointer (); if ( Result->ImageBasePtr > 0x100000 && Result->ImageBasePtr < 0xFF000000 ) { return 0; } return Result->ImageBasePtr; }
UINT32 GetFixUp(){ STDCFG* Result; Result = (STDCFG*) getConfigPointer(); return Result->pImageBase; }
LocalWorkerConfig& LocalWorker::getConfig() const { return *(dynamic_cast<LocalWorkerConfig *>(getConfigPointer())); }