From da6dc01ae2c7bc26a14af2189d345e0ec38a9660 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 Aug 2005 23:33:47 +0000 Subject: r9492: it is more usual to return 'undefined' instead of 'false' on a call failing (unless the call is returning a boolean anyway). Unfortunately the new GetOptions syntax loses the ability for the caller to know why the command line arguments were bad. Maybe we would be better always returning an object and having an is_error element? (This used to be commit 516ba6d20bd1bd8d0235028515e94a8c4fd6574d) --- source4/scripting/ejs/smbcalls_options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/scripting') diff --git a/source4/scripting/ejs/smbcalls_options.c b/source4/scripting/ejs/smbcalls_options.c index 8eca9ebcaa..3ba51bb2f4 100644 --- a/source4/scripting/ejs/smbcalls_options.c +++ b/source4/scripting/ejs/smbcalls_options.c @@ -156,7 +156,7 @@ static int ejs_GetOptions(MprVarHandle eid, int argc, struct MprVar **argv) poptStrerror(opt)); mprSetVar(options, "ERROR", mprString(err)); talloc_free(tmp_ctx); - mpr_Return(eid, mprCreateBoolVar(0)); + mpr_Return(eid, mprCreateUndefinedVar()); return 0; } opt -= BASE_OPTNUM; -- cgit