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>
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 "";
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;