Add support for logging to wherever smb.conf specifies.
authorRichard Sharpe <sharpe@samba.org>
Mon, 8 Jan 2001 02:47:30 +0000 (02:47 +0000)
committerRichard Sharpe <sharpe@samba.org>
Mon, 8 Jan 2001 02:47:30 +0000 (02:47 +0000)
(This used to be commit cc5a2db8a0c195b328b93fff566bc1120aeef54a)

source3/libsmb/libsmbclient.c

index 2cbc66986ea0a3163b74afb82a01e6aeecdbe5f0..3c1c343ec2b7da2f627dc3e7669b5c055f945083 100644 (file)
@@ -428,12 +428,16 @@ int smbc_init(smbc_get_auth_data_fn fn, const char *wgroup, int debug)
   static pstring workgroup;
   pstring conf;
   int p, pid;
-  char *user = NULL, *host = NULL, *home = NULL;
+  char *user = NULL, *host = NULL, *home = NULL, *pname="libsmbclient";
 
   smbc_initialized = 1;
   smbc_auth_fn = fn;
   smbc_debug = debug;
 
+  DEBUGLEVEL = -1;
+
+  setup_logging(pname, False);
+
   /*
    * We try to construct our netbios name from our hostname etc
    */
@@ -458,7 +462,7 @@ int smbc_init(smbc_get_auth_data_fn fn, const char *wgroup, int debug)
 
   slprintf(conf, sizeof(conf), "%s/.smb/smb.conf", home);
 
-    load_interfaces();  /* Load the list of interfaces ... */
+  load_interfaces();  /* Load the list of interfaces ... */
 
   in_client = True; /* FIXME, make a param */
 
@@ -477,6 +481,8 @@ int smbc_init(smbc_get_auth_data_fn fn, const char *wgroup, int debug)
 
   }
 
+  reopen_logs();  /* Get logging working ... */
+
   /* 
    * Now initialize the file descriptor array and figure out what the
    * max open files is, so we can return FD's that are above the max