git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e95c8f1
)
r7064: Clean up handle parameter passing after peeking at tridge's ejstest.c
author
Tim Potter
<tpot@samba.org>
Sun, 29 May 2005 03:29:10 +0000
(
03:29
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:17:11 +0000
(13:17 -0500)
(This used to be commit
805b6c7cf0f1e05fbb690bdfc93938747e13e6cd
)
source4/scripting/ejs/smbscript.c
patch
|
blob
|
history
diff --git
a/source4/scripting/ejs/smbscript.c
b/source4/scripting/ejs/smbscript.c
index 85064d3b44160148ff08b175a276e7783e5523e0..1c823a4d8edaeb1848df2d61a93a6f40825891c4 100644
(file)
--- 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;
int main(int argc, const char *argv[])
{
EjsId eid;
- EjsHandle
primary, alternat
e;
+ EjsHandle
handl
e;
MprVar result;
char *emsg;
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);
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);
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);
}
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);
}
fprintf(stderr, "smbscript: ejsEvalScript(): %s\n", emsg);
exit(1);
}