svn commit: samba r24463 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .

metze at samba.org metze at samba.org
Wed Aug 15 14:02:24 GMT 2007


Author: metze
Date: 2007-08-15 14:02:23 +0000 (Wed, 15 Aug 2007)
New Revision: 24463

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24463

Log:
we have a function to correctly create an $env object
so don't try it manually and introduce bugs:-)

metze
Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm	2007-08-15 13:44:44 UTC (rev 24462)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm	2007-08-15 14:02:23 UTC (rev 24463)
@@ -12,6 +12,7 @@
 use Parse::Pidl::Util qw(ParseExpr has_property is_constant);
 use Parse::Pidl::NDR qw(GetNextLevel);
 use Parse::Pidl::Samba4 qw(DeclLong);
+use Parse::Pidl::Samba4::NDR::Parser qw(GenerateFunctionOutEnv);
 
 use vars qw($VERSION);
 $VERSION = '0.01';
@@ -123,12 +124,10 @@
 	pidl "\tNDR_PRINT_IN_DEBUG($fn->{NAME}, &r);";
 	pidl "";
 
-	my %env = ();
+	my $env = GenerateFunctionOutEnv($fn, "r.");
 	my $hasout = 0;
 	foreach (@{$fn->{ELEMENTS}}) {
 		if (grep(/out/, @{$_->{DIRECTION}})) { $hasout = 1; }
-		next unless (grep (/in/, @{$_->{DIRECTION}}));
-		$env{$_->{NAME}} = "r.in.$_->{NAME}";
 	}
 
 	pidl "ZERO_STRUCT(r.out);" if ($hasout);
@@ -141,7 +140,7 @@
 			pidl "r.out.$_->{NAME} = r.in.$_->{NAME};";
 		} elsif (grep(/out/, @dir) and not 
 				 has_property($_, "represent_as")) {
-			AllocOutVar($_, "mem_ctx", "r.out.$_->{NAME}", \%env);
+			AllocOutVar($_, "mem_ctx", "r.out.$_->{NAME}", $env);
 		}
 	}
 	$ret .= ")";



More information about the samba-cvs mailing list