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

Commit 65841a25 authored by rswindell's avatar rswindell

Changed js_Create* prototypes.

Added js_CreateSocketObject and js_CreateClientObject.
parent 31e9e28b
......@@ -460,14 +460,14 @@ JSContext* js_initcx(SOCKET sock, JSObject** glob)
do {
lprintf("%04d JavaScript: Initializing Global object",sock);
if((js_glob=js_CreateGlobalObject(&scfg, js_cx))==NULL)
if((js_glob=js_CreateGlobalObject(js_cx, &scfg))==NULL)
break;
if (!JS_DefineFunctions(js_cx, js_glob, js_global_functions))
break;
lprintf("%04d JavaScript: Initializing System object",sock);
if((sysobj=js_CreateSystemObject(&scfg, js_cx, js_glob))==NULL)
if((sysobj=js_CreateSystemObject(js_cx, js_glob, &scfg))==NULL)
break;
sprintf(ver,"%s v%s",FTP_SERVER,FTP_VERSION);
......@@ -2227,10 +2227,10 @@ static void ctrl_thread(void* arg)
#ifdef JAVASCRIPT
JS_BeginRequest(js_cx); /* Required for multi-thread support */
if((js_user=js_CreateUserObject(&scfg, js_cx, js_glob, "user", &user))==NULL) {
if((js_user=js_CreateUserObject(js_cx, js_glob, &scfg, "user", &user))==NULL) {
lprintf("%04d !JavaScript ERROR creating user object",sock);
}
if(js_CreateFileAreaObject(&scfg, js_cx, js_glob, &user
if(js_CreateFileAreaObject(js_cx, js_glob, &scfg, &user
,startup->html_index_file)==NULL) {
lprintf("%04d !JavaScript ERROR creating file area object",sock);
}
......
......@@ -773,19 +773,24 @@ extern "C" {
#ifdef JAVASCRIPT
/* js_global.c */
DLLEXPORT JSObject* DLLCALL js_CreateGlobalObject(scfg_t* cfg, JSContext* cx);
DLLEXPORT JSObject* DLLCALL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg);
/* js_system.c */
DLLEXPORT JSObject* DLLCALL js_CreateSystemObject(scfg_t* cfg, JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* DLLCALL js_CreateSystemObject(JSContext* cx, JSObject* parent, scfg_t* cfg);
/* js_client.c */
DLLEXPORT JSObject* DLLCALL js_CreateClientObject(JSContext* cx, JSObject* parent
,char* name, client_t* client, SOCKET sock);
/* js_user.c */
DLLEXPORT JSObject* DLLCALL js_CreateUserObject(scfg_t* cfg, JSContext* cx, JSObject* parent
DLLEXPORT JSObject* DLLCALL js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* cfg
,char* name, user_t* user);
/* js_file_area.c */
DLLEXPORT JSObject* DLLCALL js_CreateFileAreaObject(scfg_t* cfg, JSContext* cx, JSObject* parent
DLLEXPORT JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_t* cfg
,user_t* user, char* html_index_file);
/* js_socket.c */
DLLEXPORT JSObject* DLLCALL js_CreateSocketClass(JSContext* cx, JSObject* parent);
DLLEXPORT JSObject* DLLCALL js_CreateSocketObject(JSContext* cx, JSObject* parent
,char *name, SOCKET sock);
/* js_console.cpp */
JSObject* js_CreateConsoleObject(JSContext* cx, JSObject* parent);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment