1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-23 20:59:10 +03:00

r23015: Make message_(de)register static to messages.c

(This used to be commit a8082a3c7c)
This commit is contained in:
Volker Lendecke
2007-05-19 21:53:28 +00:00
committed by Gerald (Jerry) Carter
parent 01a7017d7b
commit 4d5f58c2b9
9 changed files with 130 additions and 71 deletions

View File

@ -35,10 +35,11 @@ static unsigned long our_dm_mark = 0;
* Respond to a POOL_USAGE message by sending back string form of memory
* usage stats.
**/
static void msg_req_dmalloc_mark(int UNUSED(msg_type),
struct server_id UNUSED(src_pid),
void *UNUSED(buf), size_t UNUSED(len),
void *private_data)
static void msg_req_dmalloc_mark(struct messaging_context *msg,
void *private_data,
uint32_t msg_type,
struct server_id server_id,
DATA_BLOB *data)
{
#ifdef ENABLE_DMALLOC
our_dm_mark = dmalloc_mark();
@ -50,10 +51,11 @@ static void msg_req_dmalloc_mark(int UNUSED(msg_type),
static void msg_req_dmalloc_log_changed(int UNUSED(msg_type),
struct server_id UNUSED(src_pid),
void *UNUSED(buf), size_t UNUSED(len),
void *private_data)
static void msg_req_dmalloc_log_changed(struct messaging_context *msg,
void *private_data,
uint32_t msg_type,
struct server_id server_id,
DATA_BLOB *data)
{
#ifdef ENABLE_DMALLOC
dmalloc_log_changed(our_dm_mark, True, True, True);
@ -67,10 +69,11 @@ static void msg_req_dmalloc_log_changed(int UNUSED(msg_type),
/**
* Register handler for MSG_REQ_POOL_USAGE
**/
void register_dmalloc_msgs(void)
void register_dmalloc_msgs(struct messaging_context *msg_ctx)
{
message_register(MSG_REQ_DMALLOC_MARK, msg_req_dmalloc_mark, NULL);
message_register(MSG_REQ_DMALLOC_LOG_CHANGED,
msg_req_dmalloc_log_changed, NULL);
messaging_register(msg_ctx, NULL, MSG_REQ_DMALLOC_MARK,
msg_req_dmalloc_mark);
messaging_register(msg_ctx, NULL, MSG_REQ_DMALLOC_LOG_CHANGED,
msg_req_dmalloc_log_changed);
DEBUG(2, ("Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED\n"));
}