few fixes from Elrond(elrond@samba-tng.org) and Billy O'Connor(billy@oconnoronline...
authorSimo Sorce <idra@samba.org>
Tue, 11 Jun 2002 22:54:06 +0000 (22:54 +0000)
committerSimo Sorce <idra@samba.org>
Tue, 11 Jun 2002 22:54:06 +0000 (22:54 +0000)
(This used to be commit 88718883e031a3249152861300432dfc895ac587)

source3/include/debug.h
source3/lib/debug.c
source3/param/loadparm.c

index 6e721de2d2ed04892f5f5c6b30c4ab6d5e72c7fa..e56e0de14483cf22a3f5c19a1fdd32ead34e7dc6 100644 (file)
@@ -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 */
index 1b2f9ac350fd55a0a5b7e380518fb91c19cccc2a..834c1b38f7c6c67d84cefdd0e5ed83e4ba5e93f5 100644 (file)
@@ -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);
 
index 6919f5eced14ffac6e86c95593de70c99ed21702..6ad2c3262813897c68122613245d8a96ef88ece0 100644 (file)
@@ -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: