From bdefdfd75de2b2243edc3341758566be481d318c Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Tue, 20 Jan 2009 21:22:40 +0000 Subject: [PATCH] Fix bug where-by a js.on_exit() evaluation string is terminated after its first loop because the termination (e.g. dropped TCP session) flag is set: Disable the auto-termination when evaluting on-exit strings. --- src/sbbs3/js_internal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/js_internal.c b/src/sbbs3/js_internal.c index 330ff90eff..00b3ec9868 100644 --- a/src/sbbs3/js_internal.c +++ b/src/sbbs3/js_internal.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -425,6 +425,8 @@ void DLLCALL js_EvalOnExit(JSContext *cx, JSObject *obj, js_branch_t* branch) jsval rval; JSScript* script; + branch->auto_terminate=false; + while((p=strListPop(&branch->exit_func))!=NULL) { if((script=JS_CompileScript(cx, obj, p, strlen(p), NULL, 0))!=NULL) { JS_ExecuteScript(cx, obj, script, &rval); -- GitLab