From 0871be3f351e80de8b97717f7975d98702112376 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 10 Jul 2005 06:51:00 +0000 Subject: r8281: pass the callnum and rpc interface table directly from the generated code in pidl for ejs calls. This means that ejs_rpc_call() doesn't need to scan the rpc tables for the right interface, and doesn't need to scan for the call name (This used to be commit 1c6b1102e5c2529206b917e7c6b279c4f63d0e9a) --- source4/build/pidl/Parse/Pidl/Samba/EJS.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source4/build') diff --git a/source4/build/pidl/Parse/Pidl/Samba/EJS.pm b/source4/build/pidl/Parse/Pidl/Samba/EJS.pm index 26556b2820..4411324b05 100644 --- a/source4/build/pidl/Parse/Pidl/Samba/EJS.pm +++ b/source4/build/pidl/Parse/Pidl/Samba/EJS.pm @@ -628,15 +628,18 @@ sub EjsPushFunction($) ################################# # generate a ejs mapping function -sub EjsFunction($) +sub EjsFunction($$) { my $d = shift; + my $iface = shift; my $name = $d->{NAME}; + my $callnum = uc("DCERPC_$name"); + my $table = "&dcerpc_table_$iface"; pidl "static int ejs_$name(int eid, int argc, struct MprVar **argv)"; pidl "{"; indent; - pidl "return ejs_rpc_call(eid, argc, argv, \"$name\", (ejs_pull_function_t)ejs_pull_$name, (ejs_push_function_t)ejs_push_$name);"; + pidl "return ejs_rpc_call(eid, argc, argv, $table, $callnum, (ejs_pull_function_t)ejs_pull_$name, (ejs_push_function_t)ejs_push_$name);"; deindent; pidl "}\n"; } @@ -669,7 +672,7 @@ sub EjsInterface($$) EjsPullFunction($d); EjsPushFunction($d); - EjsFunction($d); + EjsFunction($d, $name); push (@fns, $d->{NAME}); } -- cgit