STEP01x: pidl: use genpad for send function formatting of CompatServer.
authorGünther Deschner <gd@samba.org>
Wed, 22 Jul 2015 17:09:47 +0000 (19:09 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Jun 2019 10:58:04 +0000 (12:58 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
pidl/lib/Parse/Pidl/Samba3/CompatServer.pm

index f882e4dda7eb2d19dab35ed194f05d8b36a9d295..b6bc7e6b2b68b005369a860b86d7bcade86a988c 100644 (file)
@@ -11,7 +11,7 @@ use Exporter;
 
 use strict;
 use Parse::Pidl qw(warning error fatal);
-use Parse::Pidl::Util qw(has_property);
+use Parse::Pidl::Util qw(has_property genpad);
 use Parse::Pidl::Samba3::ServerNDR qw(CallWithStructExported);
 
 use vars qw($VERSION);
@@ -53,11 +53,13 @@ sub ParseFunctionSend($$)
        my $op = "NDR_".uc($fn->{NAME});
 
        my $fnprefix = "_s3_compat_$fn->{NAME}";
+       my $fn_str = "static struct tevent_req *${fnprefix}_send";
+       my $pad = genpad($fn_str);
 
-       pidl "static struct tevent_req *${fnprefix}_send(TALLOC_CTX *mem_ctx,";
-       pidl "\t\t\t\t\tstruct tevent_context *ev,";
-       pidl "\t\t\t\t\tstruct dcerpc_call_handle *call,";
-       pidl "\t\t\t\t\tstruct $fn->{NAME} *r)";
+       pidl "$fn_str(TALLOC_CTX *mem_ctx,";
+       pidl "$pad"."struct tevent_context *ev,";
+       pidl "$pad"."struct dcerpc_call_handle *call,";
+       pidl "$pad"."struct $fn->{NAME} *r)";
        pidl "{";
        indent;
        pidl "struct tevent_req *req;";