Mixes for Privacy and Anonymity in the Internet
|
A thread that settles CCs with the BI. More...
Public Member Functions | |
CAAccountingSettleThread (Hashtable *a_accountingHashtable, UINT8 *currentCascade) | |
~CAAccountingSettleThread () | |
void | settle () |
Static Private Member Functions | |
static THREAD_RETURN | mainLoop (void *param) |
The main loop. More... | |
Private Attributes | |
CAConditionVariable * | m_pCondition |
CAConditionVariable * | m_pForcedSettlementCondition |
UINT8 * | m_settleCascade |
CAThread * | m_pThread |
volatile bool | m_bRun |
Hashtable * | m_accountingHashtable |
bool | m_bSleep |
A thread that settles CCs with the BI.
CAAccountingSettleThread::CAAccountingSettleThread | ( | Hashtable * | a_accountingHashtable, |
UINT8 * | currentCascade | ||
) |
CAAccountingSettleThread::~CAAccountingSettleThread | ( | ) |
References CAThread::join(), m_bRun, m_pCondition, m_pThread, and settle().
|
staticprivate |
The main loop.
Sleeps for a few minutes, then contacts the BI to settle CCs, then sleeps again
References BEGIN_STACK, E_SUCCESS, FINISH_STACK, CALibProxytest::getOptions(), CACmdLnOptions::getPaymentSettleInterval(), INIT_STACK, CAMutex::lock(), m_bRun, m_pCondition, CAAccountingInstance::newSettlementTransaction(), CAMsg::printMsg(), THREAD_RETURN_SUCCESS, CAMutex::unlock(), and CAConditionVariable::wait().
Referenced by CAAccountingSettleThread().
void CAAccountingSettleThread::settle | ( | ) |
References CAMutex::lock(), m_pCondition, CAConditionVariable::signal(), and CAMutex::unlock().
Referenced by CAAccountingInstance::handleCostConfirmation_internal(), and ~CAAccountingSettleThread().
|
private |
Referenced by CAAccountingSettleThread().
|
private |
Referenced by CAAccountingSettleThread(), mainLoop(), and ~CAAccountingSettleThread().
|
private |
|
private |
Referenced by CAAccountingSettleThread(), mainLoop(), settle(), and ~CAAccountingSettleThread().
|
private |
|
private |
Referenced by CAAccountingSettleThread(), and ~CAAccountingSettleThread().
|
private |
Referenced by CAAccountingSettleThread().