diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-08-10 06:58:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:31:34 -0500 |
commit | 8942ac69f01acc2e09a56e6accef6034622d40d4 (patch) | |
tree | 0b89121731965c95eee5e67053538c063815690e /source4/scripting | |
parent | 922f28fcbda983dcd6141f7c746d0f228302d368 (diff) | |
download | samba-8942ac69f01acc2e09a56e6accef6034622d40d4.tar.gz samba-8942ac69f01acc2e09a56e6accef6034622d40d4.tar.xz samba-8942ac69f01acc2e09a56e6accef6034622d40d4.zip |
r9227: cleanup and simplify the AJAJ code
(This used to be commit ceb7669e5991e9dda759d60a09a0a65e6caba991)
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/libjs/server_call.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/scripting/libjs/server_call.js b/source4/scripting/libjs/server_call.js index 316e764a531..a8c08780f9e 100644 --- a/source4/scripting/libjs/server_call.js +++ b/source4/scripting/libjs/server_call.js @@ -21,20 +21,20 @@ function __register_call(name, func) */ function __run_call() { var c = this; - var name = form['func']; + var name = form['ajaj_func']; if (name == undefined) { - println("no function name given in run_call"); + /* no function to run */ return; } - var args = form['args']; + var args = form['ajaj_args']; if (args == undefined) { println("no function arguments given in run_call"); - return; + exit(0); } args = decodeObject(args); if (c.calls[name] == undefined) { println("undefined remote call " + name); - return; + exit(0); } var f = c.calls[name]; var res; @@ -59,11 +59,12 @@ function __run_call() { res = f(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]); } else { println("too many arguments for remote call: " + name); - return; + exit(0); } var repobj = new Object(); repobj.res = res; write(encodeObject(repobj)); + exit(0); } |