summaryrefslogtreecommitdiff
path: root/source3/utils/smbcontrol.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-06-01 12:04:44 +0000
committerTim Potter <tpot@samba.org>2001-06-01 12:04:44 +0000
commit6dce5c47c62d6ad3d74489bde3824fbfb02d8616 (patch)
tree88e3cb5f75994eea6dce71b6c3eec20b4961dd78 /source3/utils/smbcontrol.c
parent62ce28e8d5f414d1728ec9e592f13dbccec10bad (diff)
downloadsamba-6dce5c47c62d6ad3d74489bde3824fbfb02d8616.tar.gz
samba-6dce5c47c62d6ad3d74489bde3824fbfb02d8616.tar.bz2
samba-6dce5c47c62d6ad3d74489bde3824fbfb02d8616.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. (This used to be commit 391e7caf76cbc22021629ef0ec5e0c32806edfd7)
Diffstat (limited to 'source3/utils/smbcontrol.c')
-rw-r--r--source3/utils/smbcontrol.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 30861030d8..b940b4006a 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/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]) {