From c8610144f73a6cbc26c58f57a527f7cbcb44b265 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 12 Apr 2006 06:08:24 +0000 Subject: r15049: for really efficient oplock handling with thousands of open files we will need a separate messaging endpoint per open file. To make this efficient extend the messaging layer to have a new registration function for temporary message types that maps via an idtree. I have updated the LOCAL-MESSAGING test to use the new function. (This used to be commit 4b976851d8b7ccd2c40010be095cef7fecf9e722) --- source4/lib/messaging/irpc.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source4/lib/messaging/irpc.h') diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h index 5b4abc556f..4e775bfe06 100644 --- a/source4/lib/messaging/irpc.h +++ b/source4/lib/messaging/irpc.h @@ -76,14 +76,18 @@ struct irpc_request { } async; }; +typedef void (*msg_callback_t)(struct messaging_context *msg, void *private, + uint32_t msg_type, uint32_t server_id, DATA_BLOB *data); struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, uint32_t server_id, struct event_context *ev); NTSTATUS messaging_send(struct messaging_context *msg, uint32_t server, uint32_t msg_type, DATA_BLOB *data); -void messaging_register(struct messaging_context *msg, void *private, - uint32_t msg_type, - void (*fn)(struct messaging_context *, void *, uint32_t, uint32_t, DATA_BLOB *)); +NTSTATUS messaging_register(struct messaging_context *msg, void *private, + uint32_t msg_type, + msg_callback_t fn); +NTSTATUS messaging_register_tmp(struct messaging_context *msg, void *private, + msg_callback_t fn, uint32_t *msg_type); struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, uint32_t server_id, struct event_context *ev); struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx, -- cgit