Mixe for Privacy and Anonymity in the Internet
Classes | Functions
CACmdLnOptions.cpp File Reference
#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/tre.h"
Include dependency graph for CACmdLnOptions.cpp:

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. More...
 

Function Documentation

◆ threadReConfigure()

THREAD_RETURN threadReConfigure ( void *  param)

Thread that does the actual reconfigure work.

Only one is running at the same time.

Parameters
parampointer to a t_CMNDLN_REREAD_PARAMS stuct containing a CACmdLnOptions object pointer and a CMix object pointer.

Definition at line 1229 of file CACmdLnOptions.cpp.

1230  {
1231  CACmdLnOptions* pOptions=((t_CMNDLN_REREAD_PARAMS*)param)->pCmdLnOptions;
1232  CAMix* pMix=((t_CMNDLN_REREAD_PARAMS*)param)->pMix;
1233  //pOptions->m_pcsReConfigure->lock();
1234  CAMsg::printMsg(LOG_DEBUG,"ReConfiguration of the Mix is under way....\n");
1235  CACmdLnOptions otmpOptions;
1236  XERCES_CPP_NAMESPACE::DOMDocument* docConfig=NULL;
1237  if(otmpOptions.readXmlConfiguration(docConfig,pOptions->m_strConfigFile)!=E_SUCCESS)
1238  {
1239  CAMsg::printMsg(LOG_DEBUG,"Could not re-read the config file!\n");
1240  goto REREAD_FINISH;
1241  }
1242  CAMsg::printMsg(LOG_DEBUG,"Re-readed config file -- start processing config file!\n");
1243  if(otmpOptions.processXmlConfiguration(docConfig)!=E_SUCCESS)
1244  {
1245  CAMsg::printMsg(LOG_DEBUG,"Re-readed config file -- could not process configuration!\n");
1246  goto REREAD_FINISH;
1247  }
1248  pOptions->setNewValues(otmpOptions);
1249  if(pMix!=NULL)
1250  pMix->reconfigure();
1251 
1252 REREAD_FINISH:
1253  CAMsg::printMsg(LOG_DEBUG,"ReConfiguration of the Mix finished!\n");
1254  //pOptions->m_pcsReConfigure->unlock();
1255  pOptions->m_bIsRunReConfigure=false;
1257  }
#define THREAD_RETURN_SUCCESS
Definition: StdAfx.h:542
SINT32 processXmlConfiguration(XERCES_CPP_NAMESPACE::DOMDocument *docConfig)
SINT32 setNewValues(CACmdLnOptions &newOptions)
Copies options from newOptions.
SINT32 readXmlConfiguration(XERCES_CPP_NAMESPACE::DOMDocument *&docConfig, const UINT8 *const configFileName)
Tries to read the XML configuration file configFile and parses (but not process) it.
Definition: CAMix.hpp:49
virtual SINT32 reconfigure()
Definition: CAMix.hpp:65
static SINT32 printMsg(UINT32 typ, const char *format,...)
Writes a given message to the log.
Definition: CAMsg.cpp:251
const SINT32 E_SUCCESS
Definition: errorcodes.hpp:2
CAMix * pMix
Definition: proxytest.cpp:75