diff options
author | Tim Potter <tpot@samba.org> | 2001-06-01 12:04:44 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-06-01 12:04:44 +0000 |
commit | 391e7caf76cbc22021629ef0ec5e0c32806edfd7 (patch) | |
tree | 3efe43847987eabef0c0fbab8a755d4c5a2d83a4 /source/utils/smbcontrol.c | |
parent | 81b3af71d5c9ccd20d7e7303becc35bff30c39b4 (diff) | |
download | samba-391e7caf76cbc22021629ef0ec5e0c32806edfd7.tar.gz samba-391e7caf76cbc22021629ef0ec5e0c32806edfd7.tar.xz samba-391e7caf76cbc22021629ef0ec5e0c32806edfd7.zip |
If a debug class was explicitly set to zero the debug system would not
recognise it as there was no distinction made between zeroing a debug
class and just not setting it to anything. I've added a
debuglevel_isset array in parallel with the debuglevel_class array to
fix this.
Added a couple of new debug classes which I might start filling out
to get smb, rpc header and rpc marshall/unmarshalling debugs tidied
up.
Fixed a bunch of cut&paste bugs in include/debug.h
Modified smbcontrol and the messaging system debug handler to like the
debuglevel_isset stuff.
Diffstat (limited to 'source/utils/smbcontrol.c')
-rw-r--r-- | source/utils/smbcontrol.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/utils/smbcontrol.c b/source/utils/smbcontrol.c index 30861030d80..b940b4006a0 100644 --- a/source/utils/smbcontrol.c +++ b/source/utils/smbcontrol.c @@ -180,7 +180,6 @@ static BOOL do_command(char *dest, char *msg_name, char **params) int i, n, v; int mtype; BOOL retval=False; - int debuglevel_class[DBGC_LAST]; mtype = parse_type(msg_name); if (mtype == -1) { @@ -189,19 +188,22 @@ static BOOL do_command(char *dest, char *msg_name, char **params) } switch (mtype) { - case MSG_DEBUG: + case MSG_DEBUG: { + struct debuglevel_message dm; + if (!params || !params[0]) { fprintf(stderr,"MSG_DEBUG needs a parameter\n"); return(False); } - ZERO_ARRAY(debuglevel_class); - if (!debug_parse_params(params, debuglevel_class)) { + ZERO_STRUCT(dm); + if (!debug_parse_params(params, dm.debuglevel_class, dm.debuglevel_class_isset)) { fprintf(stderr, "MSG_DEBUG error. Expected <class name>:level\n"); return(False); } else - send_message(dest, MSG_DEBUG, debuglevel_class, sizeof(debuglevel_class), False); + send_message(dest, MSG_DEBUG, &dm, sizeof(dm), False); break; + } case MSG_PROFILE: if (!params[0]) { |