git add -f bin/default/librpc/gen_ndr/*.{c,h,ndr,pidl} bin/default/source*/librpc...
[metze/samba/wip.git] / bin / default / librpc / gen_ndr / s3compat_trkwks.c
index eaca66e15b874025d58cee115765dbabd4aeae56..8fb39a17aafa2dc3148f261a4a3eb79f3ff389b7 100644 (file)
@@ -1,5 +1,7 @@
 #include "includes.h"
 #include "ntdomain.h"
+#include "lib/util/tevent_ntstatus.h"
+#include "librpc/rpc/dcerpc_connection.h"
 #include "bin/default/librpc/gen_ndr/s3compat_trkwks.h"
 
 struct _s3_compat_trkwks_Unknown0_state {
@@ -9,11 +11,11 @@ struct _s3_compat_trkwks_Unknown0_state {
 };
 
 static struct tevent_req *_s3_compat_trkwks_Unknown0_send(TALLOC_CTX *mem_ctx,
-                                       struct tevent_context *ev,
-                                       struct dcerpc_call_handle *call,
-                                       struct trkwks_Unknown0 *r)
+                                                         struct tevent_context *ev,
+                                                         struct dcerpc_call_handle *call,
+                                                         struct trkwks_Unknown0 *r)
 {
-       struct tevent_req *req
+       struct tevent_req *req;
        struct _s3_compat_trkwks_Unknown0_state *state;
        struct pipes_struct *p;
 
@@ -27,12 +29,16 @@ static struct tevent_req *_s3_compat_trkwks_Unknown0_send(TALLOC_CTX *mem_ctx,
        state->r = r;
 
        p = dcerpc_call_handle_get_pipes_struct(call);
+       if (p == NULL) {
+               tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+               return tevent_req_post(req, ev);
+       }
 
        r->out.result = _trkwks_Unknown0(p, r);
 
        if (p->fault_state) {
                NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
-               tevent_req_nterror(status);
+               tevent_req_nterror(req, status);
                return tevent_req_post(req, ev);
        }
 
@@ -46,7 +52,7 @@ static NTSTATUS _s3_compat_trkwks_Unknown0_recv(struct tevent_req *req)
 }
 
 
-static const struct dcerpc_call_entry_point_fns struct _s3_compat_trkwks_fns[] = {
+static const struct dcerpc_call_entry_point_fns _s3_compat_trkwks_fns[] = {
        {
                .send_fn = (dcerpc_call_entry_point_send_fn_t)
                        _s3_compat_trkwks_Unknown0_send,
@@ -60,10 +66,12 @@ static const struct dcerpc_call_entry_point_fns struct _s3_compat_trkwks_fns[] =
 };
 
 static const struct dcerpc_call_entry_point_vector _s3_compat_trkwks_epv[] = {
+       {
        .name = "_s3_compat_trkwks",
        .table = &ndr_table_trkwks,
        .num_fns = 1,
        .fns = _s3_compat_trkwks_fns,
+       },
 };
 
 NTSTATUS dcerpc_server_setup_s3compat_trkwks(struct dcerpc_server *server)