r9297: Add a NDR_CHECK() around each ejs push/pull.
authorTim Potter <tpot@samba.org>
Sat, 13 Aug 2005 02:59:56 +0000 (02:59 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:33:22 +0000 (13:33 -0500)
Some experimentation with the top level function calls.
(This used to be commit e8d53d15e4371bc266a691c3c3c82675373ba7f4)

source4/script/build_smb_interfaces.pl

index 1c93385a6d2c588e5bd9836401635b05bca72fe1..5fac94ca6e4ab12c9767a9082db16a7d7d3b0281 100755 (executable)
@@ -78,7 +78,7 @@ sub transfer_element($$$) {
   $type = $elt->{TYPE};
   $type =~ s/_t$//;
 
-  print FILE "\tejs_${dir}_$type(ejs, v, \"$prefix.$elt->{NAME}\")\n";
+  print FILE "\tNDR_CHECK(ejs_${dir}_$type(ejs, v, \"$prefix.$elt->{NAME}\"));\n";
 }
 
 sub transfer_struct($$) {
@@ -123,6 +123,13 @@ foreach my $s (@newheader) {
     print FILE "\n\treturn NT_STATUS_OK;\n";
     print FILE "}\n\n";
 
+    # Function call
+
+    print FILE "static int ejs_$s->{TYPE_DEFINED}(int eid, int argc, struct MprVar **argv)\n";
+    print FILE "{\n";
+    print FILE "\treturn ejs_raw_call(eid, argc, argv, (ejs_pull_function_t)ejs_pull_$s->{TYPE_DEFINED}, (ejs_push_function_t)ejs_push_$s->{TYPE_DEFINED});\n";
+    print FILE "}\n\n";
+
   } else {
 
     # Top level union