From ceffc3318ef98da022e8265bd125a90f3236f1b5 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 25 Jul 2001 03:04:07 +0000 Subject: [PATCH] Disallows dynamic toggling of JavaScript support. --- src/sbbs3/ftpsrvr.c | 2 +- src/sbbs3/main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sbbs3/ftpsrvr.c b/src/sbbs3/ftpsrvr.c index 6f11ada404..835f5e05db 100644 --- a/src/sbbs3/ftpsrvr.c +++ b/src/sbbs3/ftpsrvr.c @@ -2144,7 +2144,7 @@ static void ctrl_thread(void* arg) #endif #ifdef JAVASCRIPT - if(!(startup->options&FTP_OPT_NO_JAVASCRIPT)) { + if(js_runtime!=NULL) { if(((js_cx=js_initcx(sock,&js_glob,&js_ftp))==NULL)) { lprintf("%04d !ERROR initializing JavaScript context",sock); sockprintf(sock,"425 Error initializing JavaScript context"); diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index b6881901a7..bb2376c377 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -899,7 +899,7 @@ void event_thread(void* arg) thread_up(); #ifdef JAVASCRIPT - if(!(startup->options&BBS_OPT_NO_JAVASCRIPT)) + if(js_runtime!=NULL) sbbs->js_initcx(); /* This must be done in the context of the event thread */ #endif @@ -2539,7 +2539,7 @@ void node_thread(void* arg) sbbs_random(10); /* Throw away first number */ #ifdef JAVASCRIPT - if(!(startup->options&BBS_OPT_NO_JAVASCRIPT)) + if(js_runtime!=NULL) sbbs->js_initcx(); /* This must be done in the context of the node thread */ #endif -- GitLab