Esempio n. 1
0
int LocalWorker::addNewProcess()
{
    if (( getConfigPointer()->getURL() )&&
        ( ((LocalWorkerConfig *)getConfigPointer())->getCommand() ))
    {
        return startEx();
    }
    return 1;
}
Esempio n. 2
0
int LocalWorker::restart()
{
    setLastRestart( DateTime::s_curTime );
    clearCurConnPool();
    if (( getConfigPointer()->getURL() )&&
        ( ((LocalWorkerConfig *)getConfigPointer())->getCommand() ))
    {
        removeUnixSocket();
        moveToStopList();
        return start();
    }
    return 1;
}
Esempio n. 3
0
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();        
    }
}
Esempio n. 4
0
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;
}
Esempio n. 5
0
UINT32 GetFixUp(){
	 STDCFG* Result;
	 Result = (STDCFG*) getConfigPointer();
	 return Result->pImageBase;
}
Esempio n. 6
0
LocalWorkerConfig& LocalWorker::getConfig() const
{   return *(dynamic_cast<LocalWorkerConfig *>(getConfigPointer()));  }