summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-09 18:13:13 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-09 18:13:13 +0000
commit6b37d1f7e9bd8d451ab920ab09aa2d2e24877d62 (patch)
treec1578c0774071abc610ed6dbd680a00ca941732f /include
parent4b7165c5f9323c18925f5d9518e6f134ffc8eee2 (diff)
Add and properly test the ability for an InspTimer to DelTimer itself from within its own Tick method.
This wasnt supported before and would corrupt the iterator in the TickTimers() method of TimerManager. Non the less, peaveys new (perfectly sensible) fix broke it because i didnt document the caveat about DelTimer() :p This FIXES m_ident and possibly some other stuff. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6553 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/timer.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/timer.h b/include/timer.h
index 2d12d84e5..dbf83c2c8 100644
--- a/include/timer.h
+++ b/include/timer.h
@@ -111,7 +111,9 @@ class TimerManager : public Extensible
/** A map of timergroups, each group has a specific trigger time
*/
typedef std::map<time_t, timergroup*> timerlist;
-
+ /** Set when ticking timers, to prevent deletion while iterating
+ */
+ bool CantDeleteHere;
private:
/** The current timer set, a map of timergroups
@@ -119,6 +121,9 @@ class TimerManager : public Extensible
timerlist Timers;
public:
+ /** Constructor
+ */
+ TimerManager();
/** Tick all pending InspTimers
* @param TIME the current system time
*/