svn commit: samba r7064 - in branches/SAMBA_4_0/source/scripting/ejs: .

tpot at samba.org tpot at samba.org
Sun May 29 03:29:11 GMT 2005


Author: tpot
Date: 2005-05-29 03:29:10 +0000 (Sun, 29 May 2005)
New Revision: 7064

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7064

Log:
Clean up handle parameter passing after peeking at tridge's ejstest.c

Modified:
   branches/SAMBA_4_0/source/scripting/ejs/smbscript.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbscript.c
===================================================================
--- branches/SAMBA_4_0/source/scripting/ejs/smbscript.c	2005-05-29 03:25:21 UTC (rev 7063)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbscript.c	2005-05-29 03:29:10 UTC (rev 7064)
@@ -43,11 +43,11 @@
  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 @@
 
 	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);
 	}



More information about the samba-cvs mailing list