mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-02 08:55:53 +00:00
Add timer parameter to DeadlineTimer callback
This commit is contained in:
@@ -97,7 +97,7 @@ public:
|
||||
//
|
||||
// Note that this happens while the lock is held.
|
||||
//
|
||||
iter->m_listener->onDeadlineTimer ();
|
||||
iter->m_listener->onDeadlineTimer (*iter);
|
||||
|
||||
// Remove it from the list.
|
||||
m_items.erase (iter);
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
class Listener
|
||||
{
|
||||
public:
|
||||
virtual void onDeadlineTimer () { }
|
||||
virtual void onDeadlineTimer (DeadlineTimer&) { }
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -64,6 +64,22 @@ public:
|
||||
*/
|
||||
void reset ();
|
||||
|
||||
/** Equality comparison.
|
||||
|
||||
Timers are equal if they have the same address.
|
||||
*/
|
||||
inline bool operator== (DeadlineTimer const& other) const
|
||||
{
|
||||
return this == &other;
|
||||
}
|
||||
|
||||
/** Inequality comparison.
|
||||
*/
|
||||
inline bool operator!= (DeadlineTimer const& other) const
|
||||
{
|
||||
return this != &other;
|
||||
}
|
||||
|
||||
private:
|
||||
class Manager;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ NetworkOPs::NetworkOPs (LedgerMaster* pLedgerMaster)
|
||||
{
|
||||
}
|
||||
|
||||
void NetworkOPs::onDeadlineTimer ()
|
||||
void NetworkOPs::onDeadlineTimer (DeadlineTimer&)
|
||||
{
|
||||
ScopedLock sl (getApp().getMasterLock ());
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ public:
|
||||
InfoSub::pointer addRpcSub (const std::string& strUrl, InfoSub::ref rspEntry);
|
||||
|
||||
private:
|
||||
void onDeadlineTimer ();
|
||||
void onDeadlineTimer (DeadlineTimer&);
|
||||
|
||||
void setMode (OperatingMode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user