r7916: - got rid of the in_client global
authorAndrew Tridgell <tridge@samba.org>
Sun, 26 Jun 2005 01:11:12 +0000 (01:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:18:49 +0000 (13:18 -0500)
- make not finding smb.conf a level 1 message, not level 0. Most of our
  tools handle no smb.conf, and those that don't should check for the
  specific parameters they need, or use the defaults

source/client/client.c
source/client/smbmount.c
source/client/smbspool.c
source/param/loadparm.c
source/param/params.c

index 5e5d7e5dcde38048bbe4e8c96fed92e216171a25..c1f5ab9b34cb3c12faf2cf7a3c6d7a445b214332 100644 (file)
@@ -39,7 +39,6 @@
 #endif
 
 static struct smbcli_state *cli;
-extern BOOL in_client;
 static int port = 0;
 static pstring cur_dir = "\\";
 static pstring cd_path = "";
@@ -3370,8 +3369,6 @@ static void remember_query_host(const char *arg,
        pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, 0);
        poptSetOtherOptionHelp(pc, "[OPTIONS] service <password>");
 
-       in_client = True;   /* Make sure that we tell lp_load we are */
-
        while ((opt = poptGetNextOpt(pc)) != -1) {
                switch (opt) {
                case 'M':
index 5c541a7e4f7576c39a9db3989bb0c6acc0961687..77cd04c3c3284b2855f5f4620c4df515fa47c024 100644 (file)
@@ -25,8 +25,6 @@
 #include <asm/types.h>
 #include <linux/smb_fs.h>
 
-extern BOOL in_client;
-
 static pstring credentials;
 static pstring my_netbios_name;
 static pstring password;
@@ -870,8 +868,6 @@ static void parse_mount_smb(int argc, char **argv)
                setenv("CLI_FORCE_ASCII", "true", 1);
 #endif
 
-       in_client = True;   /* Make sure that we tell lp_load we are */
-
        if (getenv("USER")) {
                pstrcpy(username,getenv("USER"));
 
index c975e0477148fabb3e66f60381f1c1a7874f3825..2703205d7d27908f35dfea6f99c3fc93aa30baf7 100644 (file)
 
 #include "includes.h"
 
-/*
- * Globals...
- */
-
-extern BOOL            in_client;      /* Boolean for client library */
-
-
 /*
  * Local functions...
  */
@@ -184,8 +177,6 @@ static int          smb_print(struct smbcli_state *, char *, FILE *);
 
   setup_logging("smbspool", DEBUG_STDOUT);
 
-  in_client = True;   /* Make sure that we tell lp_load we are */
-
   if (!lp_load(dyn_CONFIGFILE))
   {
     fprintf(stderr, "ERROR: Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE);
index 80f7709280d3cf7a47dc7082c4f85e478003e98b..d968157a3ac309801613dccff9319dc71ec80b9e 100644 (file)
@@ -65,7 +65,6 @@
 #include "dlinklist.h"
 #include "param/loadparm.h"
 
-BOOL in_client = False;                /* Not in the client by default */
 static BOOL bLoaded = False;
 
 #ifndef GLOBAL_NAME
@@ -3025,9 +3024,7 @@ BOOL lp_load(const char *pszFname)
 
        bLoaded = True;
 
-       /* Now we check bWINSsupport and set szWINSserver to 127.0.0.1 */
-       /* if bWINSsupport is true and we are in the client            */
-       if (in_client && Globals.bWINSsupport) {
+       if (Globals.bWINSsupport) {
                lp_do_parameter(-1, "wins server", "127.0.0.1");
        }
 
index 1b5b02cfa35d655d0d10a0f70b3fb4a68ee4cd69..34d537c395a5545d1f387841f32a558b79974054 100644 (file)
@@ -518,8 +518,6 @@ static myFILE *OpenConfFile( const char *FileName )
    */
   {
   const char *func = "params.c:OpenConfFile() -";
-  extern BOOL in_client;
-  int lvl = in_client?1:0;
   myFILE *ret;
 
   ret = malloc_p(myFILE);
@@ -528,7 +526,7 @@ static myFILE *OpenConfFile( const char *FileName )
   ret->buf = file_load(FileName, &ret->size);
   if( NULL == ret->buf )
     {
-    DEBUG( lvl,
+    DEBUG( 1,
       ("%s Unable to open configuration file \"%s\":\n\t%s\n",
       func, FileName, strerror(errno)) );
     SAFE_FREE(ret);