diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-04-12 06:08:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:04:03 -0500 |
commit | c8610144f73a6cbc26c58f57a527f7cbcb44b265 (patch) | |
tree | a2be53d1ba3d22e1be1c00981d912056fa00136e /source4/lib/messaging/irpc.h | |
parent | 289911bb4e7980bf42cc87305d3f94477c5f2b75 (diff) | |
download | samba-c8610144f73a6cbc26c58f57a527f7cbcb44b265.tar.gz samba-c8610144f73a6cbc26c58f57a527f7cbcb44b265.tar.bz2 samba-c8610144f73a6cbc26c58f57a527f7cbcb44b265.zip |
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)
Diffstat (limited to 'source4/lib/messaging/irpc.h')
-rw-r--r-- | source4/lib/messaging/irpc.h | 10 |
1 files changed, 7 insertions, 3 deletions
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, |