diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbcontrol.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index f03387c6e0..318e1657cc 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -3,7 +3,7 @@ Version 3.0 program to send control messages to Samba processes Copyright (C) Andrew Tridgell 1994-1998 - Copyright (C) 2001 by Martin Pool + Copyright (C) 2001, 2002 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -39,6 +39,8 @@ static struct { {"samsync", MSG_SMB_SAM_SYNC}, {"samrepl", MSG_SMB_SAM_REPL}, {"pool-usage", MSG_REQ_POOL_USAGE }, + {"dmalloc-mark", MSG_REQ_DMALLOC_MARK }, + {"dmalloc-log-changed", MSG_REQ_DMALLOC_LOG_CHANGED }, {NULL, -1} }; @@ -68,7 +70,6 @@ static BOOL got_level; static BOOL pong_registered = False; static BOOL debuglevel_registered = False; static BOOL profilelevel_registered = False; -static BOOL pool_usage_registered = False; /** @@ -216,6 +217,12 @@ static int parse_type(char *mtype) } +static void register_all(void) +{ + message_register(MSG_POOL_USAGE, pool_usage_cb); +} + + /**************************************************************************** do command ****************************************************************************/ @@ -404,15 +411,17 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params) break; case MSG_REQ_POOL_USAGE: - if (!pool_usage_registered) { - message_register(MSG_POOL_USAGE, pool_usage_cb); - pool_usage_registered = True; - } if (!send_message(dest, MSG_REQ_POOL_USAGE, NULL, 0, True)) return False; wait_for_replies(MAX_WAIT, NULL); break; + + case MSG_REQ_DMALLOC_LOG_CHANGED: + case MSG_REQ_DMALLOC_MARK: + if (!send_message(dest, mtype, NULL, 0, False)) + return False; + break; } return (True); @@ -453,6 +462,8 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params) argc -= optind; argv = &argv[optind]; + register_all(); + if (!interactive) { if (argc < 2) usage(True); /* Need to invert sense of return code -- samba |