|
Mixe for Privacy and Anonymity in the Internet
|
#include "StdAfx.h"#include "CACmdLnOptions.hpp"#include "CAUtil.hpp"#include "CAMix.hpp"#include "CAMsg.hpp"#include "CASocketAddrINet.hpp"#include "CASocket.hpp"#include "CAXMLBI.hpp"#include "xml/DOM_Output.hpp"#include "CABase64.hpp"#include "CADynaNetworking.hpp"#include "CAAccountingDBInterface.hpp"#include "tre/regex.h"Go to the source code of this file.
Classes | |
| struct | t_CMNDLN_REREAD_PARAMS |
Functions | |
| THREAD_RETURN | threadReConfigure (void *param) |
| Thread that does the actual reconfigure work. | |
| THREAD_RETURN threadReConfigure | ( | void * | param | ) |
Thread that does the actual reconfigure work.
Only one is running at the same time.
| param | pointer to a t_CMNDLN_REREAD_PARAMS stuct containing a CACmdLnOptions object pointer and a CMix object pointer. |
Definition at line 1360 of file CACmdLnOptions.cpp.
References E_SUCCESS, CACmdLnOptions::m_bIsRunReConfigure, CACmdLnOptions::m_strConfigFile, pMix, CAMsg::printMsg(), CACmdLnOptions::processXmlConfiguration(), CACmdLnOptions::readXmlConfiguration(), CAMix::reconfigure(), CACmdLnOptions::setNewValues(), and THREAD_RETURN_SUCCESS.
{
CACmdLnOptions* pOptions=((t_CMNDLN_REREAD_PARAMS*)param)->pCmdLnOptions;
CAMix* pMix=((t_CMNDLN_REREAD_PARAMS*)param)->pMix;
//pOptions->m_pcsReConfigure->lock();
CAMsg::printMsg(LOG_DEBUG,"ReConfiguration of the Mix is under way....\n");
CACmdLnOptions otmpOptions;
XERCES_CPP_NAMESPACE::DOMDocument* docConfig=NULL;
if(otmpOptions.readXmlConfiguration(docConfig,pOptions->m_strConfigFile)!=E_SUCCESS)
{
CAMsg::printMsg(LOG_DEBUG,"Could not re-read the config file!\n");
goto REREAD_FINISH;
}
CAMsg::printMsg(LOG_DEBUG,"Re-readed config file -- start processing config file!\n");
if(otmpOptions.processXmlConfiguration(docConfig)!=E_SUCCESS)
{
CAMsg::printMsg(LOG_DEBUG,"Re-readed config file -- could not process configuration!\n");
goto REREAD_FINISH;
}
pOptions->setNewValues(otmpOptions);
if(pMix!=NULL)
pMix->reconfigure();
REREAD_FINISH:
CAMsg::printMsg(LOG_DEBUG,"ReConfiguration of the Mix finished!\n");
//pOptions->m_pcsReConfigure->unlock();
pOptions->m_bIsRunReConfigure=false;
THREAD_RETURN_SUCCESS;
}
1.7.6.1