mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
lib: Add a TALLOC_CTX to base register_msg_pool_usage() on
Add a simple way to deactivate the registration Bug: https://bugzilla.samba.org/show_bug.cgi?id=14281 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
8a23031b7b
commit
dab982d88e
@ -266,7 +266,8 @@ bool getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
|
||||
|
||||
/* The following definitions come from lib/tallocmsg.c */
|
||||
|
||||
void register_msg_pool_usage(struct messaging_context *msg_ctx);
|
||||
void register_msg_pool_usage(TALLOC_CTX *mem_ctx,
|
||||
struct messaging_context *msg_ctx);
|
||||
|
||||
/* The following definitions come from lib/time.c */
|
||||
|
||||
|
@ -590,7 +590,7 @@ static NTSTATUS messaging_init_internal(TALLOC_CTX *mem_ctx,
|
||||
|
||||
/* Register some debugging related messages */
|
||||
|
||||
register_msg_pool_usage(ctx);
|
||||
register_msg_pool_usage(ctx, ctx);
|
||||
register_dmalloc_msgs(ctx);
|
||||
debug_register_msgs(ctx);
|
||||
|
||||
|
@ -69,12 +69,13 @@ static bool pool_usage_filter(struct messaging_rec *rec, void *private_data)
|
||||
/**
|
||||
* Register handler for MSG_REQ_POOL_USAGE
|
||||
**/
|
||||
void register_msg_pool_usage(struct messaging_context *msg_ctx)
|
||||
void register_msg_pool_usage(
|
||||
TALLOC_CTX *mem_ctx, struct messaging_context *msg_ctx)
|
||||
{
|
||||
struct tevent_req *req = NULL;
|
||||
|
||||
req = messaging_filtered_read_send(
|
||||
msg_ctx,
|
||||
mem_ctx,
|
||||
messaging_tevent_context(msg_ctx),
|
||||
msg_ctx,
|
||||
pool_usage_filter,
|
||||
|
Loading…
x
Reference in New Issue
Block a user