summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-05-29 03:29:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:11 -0500
commitde850cb754f8ea49acc80e4303a9835578768154 (patch)
treeaeb7031c7e1dce19a2159503a33593bc8bfba856 /source4/scripting/ejs
parente95c8f19116813dd03cce957c3367254782915fd (diff)
downloadsamba-de850cb754f8ea49acc80e4303a9835578768154.tar.gz
samba-de850cb754f8ea49acc80e4303a9835578768154.tar.bz2
samba-de850cb754f8ea49acc80e4303a9835578768154.zip
r7064: Clean up handle parameter passing after peeking at tridge's ejstest.c
(This used to be commit 805b6c7cf0f1e05fbb690bdfc93938747e13e6cd)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/smbscript.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/ejs/smbscript.c b/source4/scripting/ejs/smbscript.c
index 85064d3b44..1c823a4d8e 100644
--- a/source4/scripting/ejs/smbscript.c
+++ b/source4/scripting/ejs/smbscript.c
@@ -43,11 +43,11 @@ static int writeProc(MprVarHandle userHandle, int argc, char **argv)
int main(int argc, const char *argv[])
{
EjsId eid;
- EjsHandle primary, alternate;
+ EjsHandle handle;
MprVar result;
char *emsg;
- if (ejsOpen(0, 0, 0) != 0) {
+ if (ejsOpen(NULL, NULL, NULL) != 0) {
fprintf(stderr, "smbscript: ejsOpen(): unable to initialise "
"EJ subsystem\n");
exit(1);
@@ -55,13 +55,13 @@ static int writeProc(MprVarHandle userHandle, int argc, char **argv)
ejsDefineStringCFunction(-1, "write", writeProc, NULL, 0);
- if ((eid = ejsOpenEngine(primary, alternate)) == (EjsId)-1) {
+ if ((eid = ejsOpenEngine(handle, 0)) == (EjsId)-1) {
fprintf(stderr, "smbscript: ejsOpenEngine(): unable to "
"initialise an EJS engine\n");
exit(1);
}
- if (ejsEvalScript(0, "write(\"hello\n\");", &result, &emsg) == -1) {
+ if (ejsEvalScript(eid, "write(\"hello\n\");", &result, &emsg) == -1) {
fprintf(stderr, "smbscript: ejsEvalScript(): %s\n", emsg);
exit(1);
}