summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-10 06:58:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:34 -0500
commit8942ac69f01acc2e09a56e6accef6034622d40d4 (patch)
tree0b89121731965c95eee5e67053538c063815690e /source4
parent922f28fcbda983dcd6141f7c746d0f228302d368 (diff)
downloadsamba-8942ac69f01acc2e09a56e6accef6034622d40d4.tar.gz
samba-8942ac69f01acc2e09a56e6accef6034622d40d4.tar.bz2
samba-8942ac69f01acc2e09a56e6accef6034622d40d4.zip
r9227: cleanup and simplify the AJAJ code
(This used to be commit ceb7669e5991e9dda759d60a09a0a65e6caba991)
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/libjs/server_call.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/scripting/libjs/server_call.js b/source4/scripting/libjs/server_call.js
index 316e764a53..a8c08780f9 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);
}