s3: Do not reference the ndr_tables in the server calls directly
[ira/wip.git] / pidl / pidl
index 02817c093b629890bfcbaf7912ad4337c037c96b..d0623a06904a7491ea8e9828bb6ebb583debe92f 100755 (executable)
--- a/pidl/pidl
+++ b/pidl/pidl
@@ -609,7 +609,7 @@ sub process_file($)
        }
 
        require Parse::Pidl::Typelist;
-       Parse::Pidl::Typelist::LoadIdl($pidl);
+       Parse::Pidl::Typelist::LoadIdl($pidl, $basename);
 
        if (defined($opt_dump_idl_tree)) {
                my($pidl_file) = ($opt_dump_idl_tree or "$outputdir/$basename.pidl");
@@ -653,7 +653,18 @@ sub process_file($)
 
        $pidl = Parse::Pidl::ODL::ODL2IDL($pidl, dirname($idl_file), \@opt_incdirs);
 
-       if (defined($opt_ws_parser) or 
+       if (defined($opt_ws_parser)) {
+         require Parse::Pidl::Wireshark::NDR;
+
+         my $cnffile = $idl_file;
+         $cnffile =~ s/\.idl$/\.cnf/;
+
+         my $generator = new Parse::Pidl::Wireshark::NDR();
+         $generator->Initialize($cnffile);
+       }
+
+
+       if (defined($opt_ws_parser) or
            defined($opt_client) or
            defined($opt_server) or 
            defined($opt_header) or
@@ -697,10 +708,9 @@ sub process_file($)
        if (defined($opt_python)) {
                require Parse::Pidl::Samba4::Python;
                my $generator = new Parse::Pidl::Samba4::Python(); 
-               my ($hdr,$prsr) = $generator->Parse($basename, $ndr, 
+               my ($prsr) = $generator->Parse($basename, $ndr, 
                                        "$outputdir/ndr_$basename\_c.h", $h_filename);
                FileSave("$outputdir/py_$basename.c", $prsr);
-               FileSave("$outputdir/py_$basename.h", $hdr);
        }
 
        if (defined($opt_server)) {