From cd88764ba16bc35f0209fbdf1a975f10bd3eb9ac Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 9 Jul 2005 11:48:59 +0000 Subject: r8260: added an init based registration system for the generated ejs rpc code, so adding a new pipe only involves changes to librpc/config.mk (This used to be commit 0e54fa446665f380e9c46723a6e2be5a08b8d51c) --- source4/build/pidl/ejs.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source4/build/pidl') diff --git a/source4/build/pidl/ejs.pm b/source4/build/pidl/ejs.pm index f67379526f..8420f8fa87 100644 --- a/source4/build/pidl/ejs.pm +++ b/source4/build/pidl/ejs.pm @@ -674,13 +674,16 @@ sub EjsInterface($) pidl "void setup_ejs_$name(void)"; pidl "{"; + indent; foreach (@fns) { pidl "ejsDefineCFunction(-1, \"dcerpc_$_\", ejs_$_, NULL, MPR_VAR_SCRIPT_HANDLE);"; } + deindent; pidl "}\n"; pidl "void setup_ejs_constants_$name(int eid)"; pidl "{"; + indent; foreach my $v (keys %constants) { my $value = $constants{$v}; if (substr($value, 0, 1) eq "\"") { @@ -689,6 +692,14 @@ sub EjsInterface($) pidl "ejs_set_constant_int(eid, \"$v\", $value);"; } } + deindent; + pidl "}\n"; + + pidl "NTSTATUS ejs_init_$name(void)"; + pidl "{"; + indent; + pidl "return smbcalls_register_ejs(\"$name\", setup_ejs_$name, setup_ejs_constants_$name);"; + deindent; pidl "}"; } -- cgit