From 1ffd6729fa794592539f66c4836faee2e62dc3a6 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Sat, 16 Nov 2013 03:05:47 +0100 Subject: [PATCH] changes in notify_shutdown --- world/drivers/ldmud/master/master.c | 7 ++++--- world/net/http/configure.c | 2 +- world/net/person.c | 4 ++-- world/net/psyc/circuit.c | 3 --- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/world/drivers/ldmud/master/master.c b/world/drivers/ldmud/master/master.c index 87c53e8..86e1246 100644 --- a/world/drivers/ldmud/master/master.c +++ b/world/drivers/ldmud/master/master.c @@ -270,7 +270,7 @@ void notify_shutdown(string crash_reason) { object o; int i; - P3(("notify_shutdown(%O) from %O\n", crash_reason, previous_object())) + P0(("notify_shutdown(%O) from %O\n", crash_reason, previous_object())) if (previous_object() && previous_object() != this_object()) return; #if DEBUG > 0 @@ -282,7 +282,8 @@ void notify_shutdown(string crash_reason) { #endif // walk thru the shutdown path a third time in case this is a // shutdown by kill -1 process. - SIMUL_EFUN_FILE -> server_shutdown(4404, 2); + SIMUL_EFUN_FILE -> server_shutdown("notify_shutdown: "+ crash_reason, + 4404, 2); // save_wiz_file(); } @@ -290,7 +291,7 @@ void notify_shutdown(string crash_reason) { void slow_shut_down(int minutes) { SIMUL_EFUN_FILE -> shout(0, "_notice_broadcast_shutdown_panic", "Server is slowly running out of memory. Restart imminent."); - SIMUL_EFUN_FILE -> server_shutdown(1, 0); + SIMUL_EFUN_FILE -> server_shutdown("slow_shut_down: "+ minutes, 1); } // called by driver at shutdown for every user diff --git a/world/net/http/configure.c b/world/net/http/configure.c index 38516a3..0b03189 100644 --- a/world/net/http/configure.c +++ b/world/net/http/configure.c @@ -266,7 +266,7 @@ htget(prot, query, headers, qs) { s += "Your chatserver is being restarted."; // write at the bottom wouldn't be called after shutdown, would it? write(s); - shutdown(); + server_shutdown("restart by web configuration", 1); return 1; case "list_udp": { diff --git a/world/net/person.c b/world/net/person.c index 4e5a97b..33b0f8c 100644 --- a/world/net/person.c +++ b/world/net/person.c @@ -626,7 +626,7 @@ sName2(a) { "Object could not be restored!"); #ifdef PANIC_ON_NO_ADMIN - shutdown(); + server_shutdown("could not restore admin"); #endif destruct(ME); return 0; @@ -687,7 +687,7 @@ sName2(a) { "You are registered as admin, but I could not restore your data!"); // raise_error("boss without password\n"); #ifdef PANIC_ON_NO_ADMIN - shutdown(); + server_shutdown("could not restore admin"); #endif destruct(ME); return 0; diff --git a/world/net/psyc/circuit.c b/world/net/psyc/circuit.c index 33c3bd0..e8d9cbb 100644 --- a/world/net/psyc/circuit.c +++ b/world/net/psyc/circuit.c @@ -215,9 +215,6 @@ int logon(int neverfails) { "Your cipher choice does not provide forward secrecy.", ([ "_circuit_encryption_cipher": t ])); QUIT - } - } - } if (mappingp(cert = tls_certificate(ME, 0))) { if (cert[0] != 0) {