diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-12 23:15:52 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-12 23:15:52 +0000 |
commit | 250c9801197ea1c949bd94c1c891f81ab118b130 (patch) | |
tree | 3a0ec79c71a010961d78726e223a70e1bc75c73f /source3/smbd/server.c | |
parent | 477025a6f628fd1a8d3bfacd30726e7a41819e50 (diff) | |
download | samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.gz samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.bz2 samba-250c9801197ea1c949bd94c1c891f81ab118b130.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 82b8f749a36b42e22186297482aad2abb04fab8a)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r-- | source3/smbd/server.c | 23 |
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)) { |