diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-20 07:20:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:29:48 -0500 |
commit | 86d628a292a22973597e0c06d4a36e20c58ae31c (patch) | |
tree | 502f4f8f915be7c4f7104cf6ad38d2239e6dff2d /source4/scripting/ejs/smbcalls_config.c | |
parent | 620301858a5b747002eebe2b9fcef10712ee8249 (diff) | |
download | samba-86d628a292a22973597e0c06d4a36e20c58ae31c.tar.gz samba-86d628a292a22973597e0c06d4a36e20c58ae31c.tar.bz2 samba-86d628a292a22973597e0c06d4a36e20c58ae31c.zip |
r8639: moved loadparm calls into an ejs object
(This used to be commit 2dc493eea6f9d87c40ad0dc755f528ce0b33ca47)
Diffstat (limited to 'source4/scripting/ejs/smbcalls_config.c')
-rw-r--r-- | source4/scripting/ejs/smbcalls_config.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbcalls_config.c b/source4/scripting/ejs/smbcalls_config.c index 18bdd0547e..7fc58f237d 100644 --- a/source4/scripting/ejs/smbcalls_config.c +++ b/source4/scripting/ejs/smbcalls_config.c @@ -140,10 +140,21 @@ static int ejs_lpGet(MprVarHandle eid, int argc, char **argv) } /* + initialise loadparm ejs subsystem +*/ +static int ejs_loadparm_init(MprVarHandle eid, int argc, struct MprVar **argv) +{ + struct MprVar *obj = mprInitObject(eid, "loadparm", argc, argv); + + mprSetStringCFunction(obj, "get", ejs_lpGet); + mprSetStringCFunction(obj, "services", ejs_lpServices); + return 0; +} + +/* setup C functions that be called from ejs */ void smb_setup_ejs_config(void) { - ejsDefineStringCFunction(-1, "lpGet", ejs_lpGet, NULL, MPR_VAR_SCRIPT_HANDLE); - ejsDefineStringCFunction(-1, "lpServices", ejs_lpServices, NULL, MPR_VAR_SCRIPT_HANDLE); + ejsDefineCFunction(-1, "loadparm_init", ejs_loadparm_init, NULL, MPR_VAR_SCRIPT_HANDLE); } |