s4-srvsvc: merge srvsvc_NetFileEnum from s3 idl.
[ira/wip.git] / source4 / rpc_server / srvsvc / dcesrv_srvsvc.c
index 103efa5f234f987014b067e33cea3da50e186cc1..5827193a3f0be4f321fa1097fb54c5cf71db978f 100644 (file)
@@ -263,28 +263,26 @@ static WERROR dcesrv_srvsvc_NetConnEnum(struct dcesrv_call_state *dce_call, TALL
 static WERROR dcesrv_srvsvc_NetFileEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
                                 struct srvsvc_NetFileEnum *r)
 {
-       r->out.level = r->in.level;
-       r->out.totalentries = 0;
-       r->out.resume_handle = NULL;
+       *r->out.totalentries = 0;
 
-       switch (r->in.level) {
+       switch (r->in.info_ctr->level) {
        case 2:
        {
-               r->out.ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetFileCtr2);
-               W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr2);
+               r->out.info_ctr->ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetFileCtr2);
+               W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr2);
 
-               r->out.ctr.ctr2->count = 0;
-               r->out.ctr.ctr2->array = NULL;
+               r->out.info_ctr->ctr.ctr2->count = 0;
+               r->out.info_ctr->ctr.ctr2->array = NULL;
 
                return WERR_NOT_SUPPORTED;
        }
        case 3:
        {
-               r->out.ctr.ctr3 = talloc(mem_ctx, struct srvsvc_NetFileCtr3);
-               W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr3);
+               r->out.info_ctr->ctr.ctr3 = talloc(mem_ctx, struct srvsvc_NetFileCtr3);
+               W_ERROR_HAVE_NO_MEMORY(r->out.info_ctr->ctr.ctr3);
 
-               r->out.ctr.ctr3->count = 0;
-               r->out.ctr.ctr3->array = NULL;
+               r->out.info_ctr->ctr.ctr3->count = 0;
+               r->out.info_ctr->ctr.ctr3->array = NULL;
 
                return WERR_NOT_SUPPORTED;
        }