mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-27 16:35:21 -04:00
fixed some bugs in TorControl
This commit is contained in:
parent
d9368507a9
commit
af4c948024
17 changed files with 128 additions and 63 deletions
|
@ -34,7 +34,7 @@
|
|||
#include "PendingOperation.h"
|
||||
|
||||
PendingOperation::PendingOperation()
|
||||
: m_finished(false)
|
||||
: m_finished(false),mFinishedCallback([](){}), mSuccessCallback([](){}),mErrorCallback([](const std::string&){})
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -67,8 +67,8 @@ void PendingOperation::finishWithError(const std::string &message)
|
|||
if (!m_finished) {
|
||||
m_finished = true;
|
||||
|
||||
finished_callback();
|
||||
error_callback(m_errorMessage);
|
||||
mFinishedCallback();
|
||||
mErrorCallback(m_errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,9 +78,9 @@ void PendingOperation::finishWithSuccess()
|
|||
|
||||
if (!m_finished) {
|
||||
m_finished = true;
|
||||
finished_callback();
|
||||
mFinishedCallback();
|
||||
if (isSuccess())
|
||||
success_callback();
|
||||
mSuccessCallback();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue