Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (1)
...@@ -560,6 +560,11 @@ long sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* sco ...@@ -560,6 +560,11 @@ long sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* sco
jsval old_js_argc = JSVAL_VOID; jsval old_js_argc = JSVAL_VOID;
jsval rval; jsval rval;
int32 result=0; int32 result=0;
struct js_event_list *events;
struct js_runq_entry *rq_head;
struct js_runq_entry *rq_tail;
struct js_listener_entry *listeners;
if(js_cx == NULL) if(js_cx == NULL)
js_cx = this->js_cx; js_cx = this->js_cx;
...@@ -682,6 +687,14 @@ long sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* sco ...@@ -682,6 +687,14 @@ long sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* sco
#endif #endif
} }
js_PrepareToExecute(js_cx, js_glob, path, startup_dir, js_scope); js_PrepareToExecute(js_cx, js_glob, path, startup_dir, js_scope);
events = js_callback.events;
js_callback.events = NULL;
rq_head = js_callback.rq_head;
js_callback.rq_head = NULL;
rq_tail = js_callback.rq_tail;
js_callback.rq_tail = NULL;
listeners = js_callback.listeners;
js_callback.listeners = NULL;
JS_ExecuteScript(js_cx, js_scope, js_script, &rval); JS_ExecuteScript(js_cx, js_scope, js_script, &rval);
js_handle_events(js_cx, &js_callback, &terminated); js_handle_events(js_cx, &js_callback, &terminated);
sys_status &=~ SS_ABORT; sys_status &=~ SS_ABORT;
...@@ -715,6 +728,11 @@ long sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* sco ...@@ -715,6 +728,11 @@ long sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* sco
JS_GC(js_cx); JS_GC(js_cx);
js_callback.events = events;
js_callback.rq_head = rq_head;
js_callback.rq_tail = rq_tail;
js_callback.listeners = listeners;
JS_ENDREQUEST(js_cx); JS_ENDREQUEST(js_cx);
return(result); return(result);
......