svn commit: samba r8334 - in branches/SAMBA_4_0/source/lib/ejs: .

tridge at samba.org tridge at samba.org
Mon Jul 11 23:16:51 GMT 2005


Author: tridge
Date: 2005-07-11 23:16:50 +0000 (Mon, 11 Jul 2005)
New Revision: 8334

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

Log:
fixed a ejs bug that prevented functions variables from being called in local context

Modified:
   branches/SAMBA_4_0/source/lib/ejs/ejsParser.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ejs/ejsParser.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ejs/ejsParser.c	2005-07-11 22:40:32 UTC (rev 8333)
+++ branches/SAMBA_4_0/source/lib/ejs/ejsParser.c	2005-07-11 23:16:50 UTC (rev 8334)
@@ -1280,10 +1280,6 @@
 
 	tid = ejsLexGetToken(ep, state);
 	if (tid == EJS_TOK_LPAREN) {
-		if (ep->currentProperty == 0) {
-			ejsError(ep, "Function name not defined \"%s\"\n", *id);
-			return -1;
-		}
 		ejsLexPutbackToken(ep, EJS_TOK_FUNCTION_NAME, ep->token);
 		return state;
 	}
@@ -1979,6 +1975,11 @@
 	actualArgs = proc->args;
 	argValues = (MprVar**) actualArgs->handles;
 
+	if (prototype == NULL) {
+		ejsError(ep, "Function name not defined '%s'\n", proc->procName);
+		return -1;
+	}
+
 	/*
 	 *	Create a new variable stack frame. ie. new local variables.
  	 */



More information about the samba-cvs mailing list