pidl:NDR/Parser: don't call [noopnum] function when creating the ndr_interface_table
authorStefan Metzmacher <metze@samba.org>
Thu, 19 Feb 2009 09:32:48 +0000 (10:32 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 19 Feb 2009 10:13:33 +0000 (11:13 +0100)
metze

pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm

index 84752dac0de0371bae870ae74a6588183cd231f5..af6885f67a6815d94cd89c4485a2fee8168471d5 100644 (file)
@@ -2236,7 +2236,7 @@ sub AuthServiceStruct($$$)
 sub FunctionCallEntry($$)
 {
        my ($self, $d) = @_;
-       return if not defined($d->{OPNUM});
+       return if not defined($d->{OPNUM});
        $self->pidl("\t{");
        $self->pidl("\t\t\"$d->{NAME}\",");
        $self->pidl("\t\tsizeof(struct $d->{NAME}),");
@@ -2245,6 +2245,7 @@ sub FunctionCallEntry($$)
        $self->pidl("\t\t(ndr_print_function_t) ndr_print_$d->{NAME},");
        $self->pidl("\t\t".($d->{ASYNC}?"true":"false").",");
        $self->pidl("\t},");
+       return 1;
 }
 
 #####################################################################
@@ -2261,8 +2262,7 @@ sub FunctionTable($$)
        $self->pidl("static const struct ndr_interface_call $interface->{NAME}\_calls[] = {");
 
        foreach my $d (@{$interface->{INHERITED_FUNCTIONS}},@{$interface->{FUNCTIONS}}) {
-               $self->FunctionCallEntry($d);
-               $count++;
+               $count += $self->FunctionCallEntry($d);
        }
        $self->pidl("\t{ NULL, 0, NULL, NULL, NULL, false }");
        $self->pidl("};");