diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-01-26 20:11:11 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-01-26 20:11:11 +0000 |
commit | 9c2591c20a27391ce5345f67252535d129168520 (patch) | |
tree | 06ee5959db19be96ea886d44d992b883a812c632 | |
parent | 6c51b17ef14b57f8715c840c253c99eef3683bde (diff) |
Manual backport of r1935 / 183bf6525b84: check noexpire/readonly in expire_all(), otherwise stuff will get expired on shutdown.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1937 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | src/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index ca439c3e9..fbebc043e 100644 --- a/src/main.c +++ b/src/main.c @@ -102,6 +102,12 @@ static int started = 0; extern void expire_all(void) { + if (noexpire || readonly) + { + /* don't allow expiry here or bad things will happen. */ + return; + } + waiting = -30; send_event(EVENT_DB_EXPIRE, 1, EVENT_START); waiting = -3; @@ -613,8 +619,7 @@ int main(int ac, char **av, char **envp) if (debug >= 2) alog("debug: Top of main loop"); - if (!noexpire && !readonly - && (save_data || t - last_expire >= ExpireTimeout)) { + if (save_data || t - last_expire >= ExpireTimeout) { expire_all(); last_expire = t; } |