summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-06-11 22:54:06 +0000
committerSimo Sorce <idra@samba.org>2002-06-11 22:54:06 +0000
commit2d64b9880744746d4317d9da45c575b3a8fbbed1 (patch)
tree7a099c2efd6df22c513ebb3d3f48247ad9747b49
parent366a649d043346a3302516465d41c5151d991b53 (diff)
downloadsamba-2d64b9880744746d4317d9da45c575b3a8fbbed1.tar.gz
samba-2d64b9880744746d4317d9da45c575b3a8fbbed1.tar.bz2
samba-2d64b9880744746d4317d9da45c575b3a8fbbed1.zip
few fixes from Elrond(elrond@samba-tng.org) and Billy O'Connor(billy@oconnoronline.net)
(This used to be commit 88718883e031a3249152861300432dfc895ac587)
-rw-r--r--source3/include/debug.h11
-rw-r--r--source3/lib/debug.c12
-rw-r--r--source3/param/loadparm.c14
3 files changed, 24 insertions, 13 deletions
diff --git a/source3/include/debug.h b/source3/include/debug.h
index 6e721de2d2..e56e0de144 100644
--- a/source3/include/debug.h
+++ b/source3/include/debug.h
@@ -85,11 +85,12 @@ extern int DEBUGLEVEL;
#define DBGC_PRINTDRIVERS 2
#define DBGC_LANMAN 3
#define DBGC_SMB 4
-#define DBGC_RPC_SRV 5
-#define DBGC_RPC_CLI 6
-#define DBGC_PASSDB 7
-#define DBGC_AUTH 8
-#define DBGC_WINBIND 9
+#define DBGC_RPC 5
+#define DBGC_RPC_SRV 6
+#define DBGC_RPC_CLI 7
+#define DBGC_PASSDB 8
+#define DBGC_AUTH 9
+#define DBGC_WINBIND 10
/* So you can define DBGC_CLASS before including debug.h */
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 1b2f9ac350..834c1b38f7 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -150,10 +150,11 @@ static const char *default_classname_table[] = {
"lanman", /* DBGC_LANMAN */
"smb", /* DBGC_SMB */
"rpc", /* DBGC_RPC */
- "rpc_hdr", /* DBGC_RPC_HDR */
+ "rpc_srv", /* DBGC_RPC_SRV */
+ "rpc_cli", /* DBGC_RPC_CLI */
"passdb", /* DBGC_PASSDB */
"auth", /* DBGC_AUTH */
- "bdc", /* DBGC_BDC */
+ "winbind", /* DBGC_WINBIND */
NULL
};
@@ -171,7 +172,7 @@ utility lists registered debug class names's
#define MAX_CLASS_NAME_SIZE 1024
-char *debug_list_class_names_and_levels(void)
+static char *debug_list_class_names_and_levels(void)
{
int i, dim;
char **list;
@@ -416,8 +417,11 @@ BOOL debug_parse_levels(const char *params_str)
{
char **params;
+ /* Just in case */
+ debug_init();
+
if (AllowDebugChange == False)
- return True;
+ return True;
params = lp_list_make(params_str);
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 6919f5eced..6ad2c32628 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3422,13 +3422,19 @@ static void lp_save_defaults(void)
break;
case P_STRING:
case P_USTRING:
- parm_table[i].def.svalue =
- strdup(*(char **)parm_table[i].ptr);
+ if (parm_table[i].ptr) {
+ parm_table[i].def.svalue = strdup(*(char **)parm_table[i].ptr);
+ } else {
+ parm_table[i].def.svalue = NULL;
+ }
break;
case P_GSTRING:
case P_UGSTRING:
- parm_table[i].def.svalue =
- strdup((char *)parm_table[i].ptr);
+ if (parm_table[i].ptr) {
+ parm_table[i].def.svalue = strdup((char *)parm_table[i].ptr);
+ } else {
+ parm_table[i].def.svalue = NULL;
+ }
break;
case P_BOOL:
case P_BOOLREV: