diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-19 00:40:52 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:29:38 -0500 |
commit | 2d92eca39316a9edb17a1ffee0087f7365453471 (patch) | |
tree | 8c16d2c45998b0aaefec04a509f7c880cbd5ef73 /source4 | |
parent | f1245d4ac1f06988dc4501c14c0e8161be8028aa (diff) | |
download | samba-2d92eca39316a9edb17a1ffee0087f7365453471.tar.gz samba-2d92eca39316a9edb17a1ffee0087f7365453471.tar.bz2 samba-2d92eca39316a9edb17a1ffee0087f7365453471.zip |
r8562: small merge with upstream
(This used to be commit 6c9bf162afddda4747ef08b56598aaf0747a4d27)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/appweb/ejs/ejsParser.c | 15 | ||||
-rw-r--r-- | source4/lib/appweb/esp/esp.h | 2 |
2 files changed, 5 insertions, 12 deletions
diff --git a/source4/lib/appweb/ejs/ejsParser.c b/source4/lib/appweb/ejs/ejsParser.c index 772ed574c5..452e7fde8f 100644 --- a/source4/lib/appweb/ejs/ejsParser.c +++ b/source4/lib/appweb/ejs/ejsParser.c @@ -1280,6 +1280,10 @@ 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 && (flags & EJS_FLAGS_EXE)) { + ejsError(ep, "Function name not defined \"%s\"\n", *id); + return -1; + } ejsLexPutbackToken(ep, EJS_TOK_FUNCTION_NAME, ep->token); return state; } @@ -1975,11 +1979,6 @@ 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. */ @@ -2179,7 +2178,6 @@ int ejsRunFunction(int eid, MprVar *obj, const char *functionName, MprVar *ejsFindObj(Ejs *ep, int state, const char *property, int flags) { - MprVar *vp; MprVar *obj; mprAssert(ep); @@ -2193,10 +2191,7 @@ MprVar *ejsFindObj(Ejs *ep, int state, const char *property, int flags) } else { /* First look local, then look global */ - vp = mprGetProperty(ep->local, property, 0); - if (vp) { - obj = ep->local; - } else if (mprGetProperty(ep->local, property, 0)) { + if (mprGetProperty(ep->local, property, 0)) { obj = ep->local; } else { obj = ep->global; diff --git a/source4/lib/appweb/esp/esp.h b/source4/lib/appweb/esp/esp.h index e15daf0b4e..39dc5310c2 100644 --- a/source4/lib/appweb/esp/esp.h +++ b/source4/lib/appweb/esp/esp.h @@ -43,8 +43,6 @@ /*********************************** Defines **********************************/ -#define ESP_STRING_ARGS MPR_TYPE_STRING_ARGS - #if BLD_FEATURE_SQUEEZE #define ESP_TOK_INCR 1024 #define ESP_MAX_HEADER 1024 |