summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-23 16:24:07 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-23 16:24:07 +0200
commitcceac63aaab26a72e2f3fd150dd1e4e83a0e5279 (patch)
tree6203cca724fc5f17f068e3fd4d0b403fdff3f8f9 /source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
parent7c7880695b02df4cbe0faab959846c63d0cc0536 (diff)
parent72fce654072b2d7317ff21c95558bd365701d5dd (diff)
downloadsamba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.tar.gz
samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.tar.bz2
samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-wsgi
Conflicts: source/scripting/python/samba/provision.py (This used to be commit d27de633656f8a699222df77c4c58326890889a2)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm')
-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}\",");