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

jelmer at samba.org jelmer at samba.org
Tue Sep 19 22:18:16 GMT 2006


Author: jelmer
Date: 2006-09-19 22:18:16 +0000 (Tue, 19 Sep 2006)
New Revision: 18689

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

Log:
Initialize r.out in the server side code, in case the handler function 
doesn't touch them.

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	2006-09-19 22:14:34 UTC (rev 18688)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm	2006-09-19 22:18:16 UTC (rev 18689)
@@ -82,11 +82,15 @@
 	pidl "";
 
 	my %env = ();
+	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);
+
 	my $proto = "_$fn->{NAME}(pipes_struct *p";
 	my $ret = "_$fn->{NAME}(p";
 	foreach (@{$fn->{ELEMENTS}}) {



More information about the samba-cvs mailing list