summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-12 23:20:50 +0000
committerJeremy Allison <jra@samba.org>2002-11-12 23:20:50 +0000
commit2f194322d419350f35a48dff750066894d68eccf (patch)
treeb0501eaf874ca8e740a51a8e0f29d261e32e0093 /source3/smbd/server.c
parentf2b669b37fecda2687860eba4a15801dc89855dc (diff)
downloadsamba-2f194322d419350f35a48dff750066894d68eccf.tar.gz
samba-2f194322d419350f35a48dff750066894d68eccf.tar.bz2
samba-2f194322d419350f35a48dff750066894d68eccf.zip
Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 3d9a4675b2..342c7c85cf 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -22,9 +22,6 @@
#include "includes.h"
-extern fstring global_myworkgroup;
-extern pstring global_myname;
-
int am_parent = 1;
/* the last message the was processed */
@@ -200,7 +197,7 @@ static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports)
for(i = 0; i < num_interfaces; i++) {
struct in_addr *ifip = iface_n_ip(i);
fstring tok;
- char *ptr;
+ const char *ptr;
if(ifip == NULL) {
DEBUG(0,("open_sockets_smbd: interface %d has NULL IP address !\n", i));
@@ -237,7 +234,7 @@ static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports)
from anywhere. */
fstring tok;
- char *ptr;
+ const char *ptr;
num_interfaces = 1;
@@ -582,22 +579,15 @@ void exit_server(char *reason)
Initialise connect, service and file structs.
****************************************************************************/
-static void init_structs(void )
+static BOOL init_structs(void )
{
/*
* Set the machine NETBIOS name if not already
* set from the config file.
*/
- if (!*global_myname) {
- char *p;
- pstrcpy( global_myname, myhostname() );
- p = strchr_m(global_myname, '.' );
- if (p)
- *p = 0;
- }
-
- strupper(global_myname);
+ if (!init_names())
+ return False;
conn_init();
@@ -610,6 +600,7 @@ static void init_structs(void )
secrets_init();
+ return True;
}
/****************************************************************************
@@ -740,8 +731,6 @@ static void init_structs(void )
}
#endif
- fstrcpy(global_myworkgroup, lp_workgroup());
-
DEBUG(3,( "loaded services\n"));
if (!is_daemon && !is_a_socket(0)) {