1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

r21064: The core of this patch is

void message_register(int msg_type,
                      void (*fn)(int msg_type, struct process_id pid,
-                                void *buf, size_t len))
+                                void *buf, size_t len,
+                                void *private_data),
+                     void *private_data)
 {
        struct dispatch_fns *dfn;

So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.

Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.

Volker
This commit is contained in:
Volker Lendecke
2007-01-30 22:22:06 +00:00
committed by Gerald (Jerry) Carter
parent 7e17e54cb7
commit c8ae60ed65
23 changed files with 166 additions and 108 deletions

View File

@@ -66,7 +66,8 @@ static void msg_pool_usage_helper(const void *ptr, int depth, int max_depth, int
* usage stats.
**/
void msg_pool_usage(int msg_type, struct process_id src_pid,
void *UNUSED(buf), size_t UNUSED(len))
void *UNUSED(buf), size_t UNUSED(len),
void *private_data)
{
struct msg_pool_usage_state state;
@@ -100,6 +101,6 @@ void msg_pool_usage(int msg_type, struct process_id src_pid,
**/
void register_msg_pool_usage(void)
{
message_register(MSG_REQ_POOL_USAGE, msg_pool_usage);
message_register(MSG_REQ_POOL_USAGE, msg_pool_usage, NULL);
DEBUG(2, ("Registered MSG_REQ_POOL_USAGE\n"));
}