svn commit: samba r7916 - in branches/SAMBA_4_0/source: client param

tridge at samba.org tridge at samba.org
Sun Jun 26 01:11:13 GMT 2005


Author: tridge
Date: 2005-06-26 01:11:12 +0000 (Sun, 26 Jun 2005)
New Revision: 7916

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7916

Log:
- got rid of the in_client global

- 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

Modified:
   branches/SAMBA_4_0/source/client/client.c
   branches/SAMBA_4_0/source/client/smbmount.c
   branches/SAMBA_4_0/source/client/smbspool.c
   branches/SAMBA_4_0/source/param/loadparm.c
   branches/SAMBA_4_0/source/param/params.c


Changeset:
Modified: branches/SAMBA_4_0/source/client/client.c
===================================================================
--- branches/SAMBA_4_0/source/client/client.c	2005-06-26 00:23:06 UTC (rev 7915)
+++ branches/SAMBA_4_0/source/client/client.c	2005-06-26 01:11:12 UTC (rev 7916)
@@ -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 @@
 	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':

Modified: branches/SAMBA_4_0/source/client/smbmount.c
===================================================================
--- branches/SAMBA_4_0/source/client/smbmount.c	2005-06-26 00:23:06 UTC (rev 7915)
+++ branches/SAMBA_4_0/source/client/smbmount.c	2005-06-26 01:11:12 UTC (rev 7916)
@@ -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 @@
 		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"));
 

Modified: branches/SAMBA_4_0/source/client/smbspool.c
===================================================================
--- branches/SAMBA_4_0/source/client/smbspool.c	2005-06-26 00:23:06 UTC (rev 7915)
+++ branches/SAMBA_4_0/source/client/smbspool.c	2005-06-26 01:11:12 UTC (rev 7916)
@@ -23,13 +23,6 @@
 #include "includes.h"
 
 /*
- * Globals...
- */
-
-extern BOOL		in_client;	/* Boolean for client library */
-
-
-/*
  * Local functions...
  */
 
@@ -184,8 +177,6 @@
 
   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);

Modified: branches/SAMBA_4_0/source/param/loadparm.c
===================================================================
--- branches/SAMBA_4_0/source/param/loadparm.c	2005-06-26 00:23:06 UTC (rev 7915)
+++ branches/SAMBA_4_0/source/param/loadparm.c	2005-06-26 01:11:12 UTC (rev 7916)
@@ -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 @@
 
 	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");
 	}
 

Modified: branches/SAMBA_4_0/source/param/params.c
===================================================================
--- branches/SAMBA_4_0/source/param/params.c	2005-06-26 00:23:06 UTC (rev 7915)
+++ branches/SAMBA_4_0/source/param/params.c	2005-06-26 01:11:12 UTC (rev 7916)
@@ -518,8 +518,6 @@
    */
   {
   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 @@
   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);



More information about the samba-cvs mailing list