summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-11 23:16:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:20:07 -0500
commit8435fbc4afe66848ff6732d653dc6e7b692fb622 (patch)
tree69b3f739e8754d2e6e943ae98e768ccbc1767575 /source4
parentba1ee57df43fe93c8b650478324ddd6cc1a3c7bc (diff)
downloadsamba-8435fbc4afe66848ff6732d653dc6e7b692fb622.tar.gz
samba-8435fbc4afe66848ff6732d653dc6e7b692fb622.tar.bz2
samba-8435fbc4afe66848ff6732d653dc6e7b692fb622.zip
r8334: fixed a ejs bug that prevented functions variables from being called in local context
(This used to be commit 5ea7ae70813f615769aff7640cc19005e30ecf12)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ejs/ejsParser.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/lib/ejs/ejsParser.c b/source4/lib/ejs/ejsParser.c
index a5c40e593d..772ed574c5 100644
--- a/source4/lib/ejs/ejsParser.c
+++ b/source4/lib/ejs/ejsParser.c
@@ -1280,10 +1280,6 @@ static int parseId(Ejs *ep, int state, int flags, char **id, char **fullName,
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 @@ static int evalFunction(Ejs *ep, MprVar *obj, int flags)
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.
*/