summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-11-21 11:57:48 +1300
committerAndrew Bartlett <abartlet@samba.org>2016-12-01 05:54:22 +0100
commitd368ee2298bc472caca940a3db7a4f855df6ca21 (patch)
treebfe96df9c1ee0896de72dc994293e5080325e694
parentd4990bcf7f62ff243f148ec460feab7fad35b6c9 (diff)
downloadsamba-d368ee2298bc472caca940a3db7a4f855df6ca21.tar.gz
pidl: Change *_get_pipe_fns() to return const struct api_struct *
This will allow the table to be made static const in the next commit Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm6
-rw-r--r--source3/winbindd/winbindd_dual_ndr.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index bae84af0671..a680d5ce9a4 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -266,12 +266,12 @@ sub ParseInterface($)
pidl "";
- pidl_hdr "void $if->{NAME}_get_pipe_fns(struct api_struct **fns, int *n_fns);";
- pidl "void $if->{NAME}_get_pipe_fns(struct api_struct **fns, int *n_fns)";
+ pidl_hdr "const struct api_struct *$if->{NAME}_get_pipe_fns(int *n_fns);";
+ pidl "const struct api_struct *$if->{NAME}_get_pipe_fns(int *n_fns)";
pidl "{";
indent;
- pidl "*fns = api_$if->{NAME}_cmds;";
pidl "*n_fns = sizeof(api_$if->{NAME}_cmds) / sizeof(struct api_struct);";
+ pidl "return api_$if->{NAME}_cmds;";
deindent;
pidl "}";
pidl "";
diff --git a/source3/winbindd/winbindd_dual_ndr.c b/source3/winbindd/winbindd_dual_ndr.c
index ed2b5ea22da..250d9d3da59 100644
--- a/source3/winbindd/winbindd_dual_ndr.c
+++ b/source3/winbindd/winbindd_dual_ndr.c
@@ -300,11 +300,11 @@ enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
struct winbindd_cli_state *state)
{
struct pipes_struct p;
- struct api_struct *fns;
+ const struct api_struct *fns;
int num_fns;
bool ret;
- winbind_get_pipe_fns(&fns, &num_fns);
+ fns = winbind_get_pipe_fns(&num_fns);
if (state->request->data.ndrcmd >= num_fns) {
return WINBINDD_ERROR;