#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 {
};
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;
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);
}
}
-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,
};
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)