summaryrefslogtreecommitdiffstats
path: root/source3/nmbd/nmbd_incomingrequests.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/nmbd/nmbd_incomingrequests.c
parentf2b669b37fecda2687860eba4a15801dc89855dc (diff)
downloadsamba-2f194322d419350f35a48dff750066894d68eccf.tar.gz
samba-2f194322d419350f35a48dff750066894d68eccf.tar.xz
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/nmbd/nmbd_incomingrequests.c')
-rw-r--r--source3/nmbd/nmbd_incomingrequests.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source3/nmbd/nmbd_incomingrequests.c b/source3/nmbd/nmbd_incomingrequests.c
index 834f237a2c..a8168566f1 100644
--- a/source3/nmbd/nmbd_incomingrequests.c
+++ b/source3/nmbd/nmbd_incomingrequests.c
@@ -27,8 +27,6 @@
#include "includes.h"
-extern fstring global_myworkgroup;
-
/****************************************************************************
Send a name release response.
**************************************************************************/
@@ -100,7 +98,7 @@ subnet %s from owner IP %s\n",
* names and *don't set the group bit* !!!!!
*/
- if( !group && !ismyip(owner_ip) && strequal(question->name, global_myworkgroup) &&
+ if( !group && !ismyip(owner_ip) && strequal(question->name, lp_workgroup()) &&
((question->name_type == 0x0) || (question->name_type == 0x1e)))
{
DEBUG(6,("process_name_release_request: FTP OnNet bug workaround. Ignoring \
@@ -292,20 +290,19 @@ We put our own names first, then in alphabetical order.
static int status_compare(char *n1,char *n2)
{
- extern pstring global_myname;
int l1,l2,l3;
/* It's a bit tricky because the names are space padded */
for (l1=0;l1<15 && n1[l1] && n1[l1] != ' ';l1++) ;
for (l2=0;l2<15 && n2[l2] && n2[l2] != ' ';l2++) ;
- l3 = strlen(global_myname);
+ l3 = strlen(global_myname());
- if ((l1==l3) && strncmp(n1,global_myname,l3) == 0 &&
- (l2!=l3 || strncmp(n2,global_myname,l3) != 0))
+ if ((l1==l3) && strncmp(n1,global_myname(),l3) == 0 &&
+ (l2!=l3 || strncmp(n2,global_myname(),l3) != 0))
return -1;
- if ((l2==l3) && strncmp(n2,global_myname,l3) == 0 &&
- (l1!=l3 || strncmp(n1,global_myname,l3) != 0))
+ if ((l2==l3) && strncmp(n2,global_myname(),l3) == 0 &&
+ (l1!=l3 || strncmp(n1,global_myname(),l3) != 0))
return 1;
return memcmp(n1,n2,18);