summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/messaging/irpc.h3
-rw-r--r--source4/lib/messaging/messaging.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h
index aa06a2de06..e83e7dce65 100644
--- a/source4/lib/messaging/irpc.h
+++ b/source4/lib/messaging/irpc.h
@@ -34,6 +34,7 @@ struct irpc_message {
struct messaging_context *msg_ctx;
struct irpc_list *irpc;
void *data;
+ struct event_context *ev;
};
/* don't allow calls to take too long */
@@ -108,6 +109,6 @@ NTSTATUS irpc_call(struct messaging_context *msg_ctx,
NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name);
uint32_t *irpc_servers_byname(struct messaging_context *msg_ctx, const char *name);
void irpc_remove_name(struct messaging_context *msg_ctx, const char *name);
-NTSTATUS irpc_send_reply(struct irpc_message *m);
+NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status);
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 9fcfd58972..c3d3ba7899 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -512,12 +512,13 @@ static void irpc_handler_reply(struct messaging_context *msg_ctx, struct irpc_me
/*
send a irpc reply
*/
-NTSTATUS irpc_send_reply(struct irpc_message *m)
+NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status)
{
struct ndr_push *push;
- NTSTATUS status;
DATA_BLOB packet;
+ m->header.status = status;
+
/* setup the reply */
push = ndr_push_init_ctx(m->ndr);
if (push == NULL) {
@@ -582,6 +583,7 @@ static void irpc_handler_request(struct messaging_context *msg_ctx,
m->msg_ctx = msg_ctx;
m->irpc = i;
m->data = r;
+ m->ev = msg_ctx->event.ev;
m->header.status = i->fn(m, r);
@@ -591,7 +593,7 @@ static void irpc_handler_request(struct messaging_context *msg_ctx,
return;
}
- irpc_send_reply(m);
+ irpc_send_reply(m, m->header.status);
return;
failed: