summaryrefslogtreecommitdiff
path: root/source4/pidl/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-04-06 19:16:43 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-04-06 19:16:43 +1000
commit5454dc044da9e3c91fca6e55659a6d6a44179b4f (patch)
treedb992a4a271b36032efd60cb7bb5cdc4b365fd62 /source4/pidl/lib
parent4c449fe95f20676553b04a6028310191b4a2a32a (diff)
parentc30f9add8cc5b060b73381f53671ecd01c31cdd8 (diff)
downloadsamba-5454dc044da9e3c91fca6e55659a6d6a44179b4f.tar.gz
samba-5454dc044da9e3c91fca6e55659a6d6a44179b4f.tar.bz2
samba-5454dc044da9e3c91fca6e55659a6d6a44179b4f.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit beff331e15e7896d80831135fd52b90cd9ab073e)
Diffstat (limited to 'source4/pidl/lib')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm37
1 files changed, 22 insertions, 15 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index a959dc84f6..0d1806a0fa 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -2190,6 +2190,26 @@ sub ParseFunctionPull($$)
$self->pidl("");
}
+sub AuthServiceStruct($$$)
+{
+ my ($self, $ifacename, $authservice) = @_;
+ my @a = split /,/, $authservice;
+ my $authservice_count = $#a + 1;
+
+ $self->pidl("static const char * const $ifacename\_authservice_strings[] = {");
+ foreach my $ap (@a) {
+ $self->pidl("\t$ap, ");
+ }
+ $self->pidl("};");
+ $self->pidl("");
+
+ $self->pidl("static const struct ndr_interface_string_array $ifacename\_authservices = {");
+ $self->pidl("\t.count\t= $authservice_count,");
+ $self->pidl("\t.names\t= $ifacename\_authservice_strings");
+ $self->pidl("};");
+ $self->pidl("");
+}
+
#####################################################################
# produce a function call table
sub FunctionTable($$)
@@ -2237,21 +2257,8 @@ sub FunctionTable($$)
$interface->{PROPERTIES}->{authservice} = "\"host\"";
}
- my @a = split /,/, $interface->{PROPERTIES}->{authservice};
- my $authservice_count = $#a + 1;
-
- $self->pidl("static const char * const $interface->{NAME}\_authservice_strings[] = {");
- foreach my $ap (@a) {
- $self->pidl("\t$ap, ");
- }
- $self->pidl("};");
- $self->pidl("");
-
- $self->pidl("static const struct ndr_interface_string_array $interface->{NAME}\_authservices = {");
- $self->pidl("\t.count\t= $endpoint_count,");
- $self->pidl("\t.names\t= $interface->{NAME}\_authservice_strings");
- $self->pidl("};");
- $self->pidl("");
+ $self->AuthServiceStruct($interface->{NAME},
+ $interface->{PROPERTIES}->{authservice});
$self->pidl("\nconst struct ndr_interface_table ndr_table_$interface->{NAME} = {");
$self->pidl("\t.name\t\t= \"$interface->{NAME}\",");