diff options
author | Jeremy Allison <jra@samba.org> | 1998-04-25 01:12:08 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-04-25 01:12:08 +0000 |
commit | 866406bfe399cf757c8275093dacd5ce4843afa0 (patch) | |
tree | dba39cbc72b2c29f74298c9543c29ec2a5dc5e71 /source/nmbd/nmbd_serverlistdb.c | |
parent | a8b641c027c8cce179455ac1f6fd0322a8ab017d (diff) | |
download | samba-866406bfe399cf757c8275093dacd5ce4843afa0.tar.gz samba-866406bfe399cf757c8275093dacd5ce4843afa0.tar.xz samba-866406bfe399cf757c8275093dacd5ce4843afa0.zip |
This looks like a big change but really isn't.
It is changing the global variables "myname" and "myworkgroup"
to "global_myname" and "global_myworkgroup" respectively.
This is to make it very explicit when we are messing
with a global (don't ask - it makes the domain client
code much clearer :-).
Jeremy.
Diffstat (limited to 'source/nmbd/nmbd_serverlistdb.c')
-rw-r--r-- | source/nmbd/nmbd_serverlistdb.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/nmbd/nmbd_serverlistdb.c b/source/nmbd/nmbd_serverlistdb.c index e94cb1da6e9..ea1948cece0 100644 --- a/source/nmbd/nmbd_serverlistdb.c +++ b/source/nmbd/nmbd_serverlistdb.c @@ -29,8 +29,7 @@ extern int ClientNMB; extern int DEBUGLEVEL; -extern pstring myname; -extern fstring myworkgroup; +extern fstring global_myworkgroup; extern char **my_netbios_names; int updatecount = 0; @@ -259,7 +258,7 @@ static uint32 write_this_server_name( struct subnet_record *subrec, /******************************************************************* Decide if we should write out a workgroup record for this workgroup. - We return zero if we should not. Don't write out myworkgroup (we've + We return zero if we should not. Don't write out global_myworkgroup (we've already done it) and also don't write out a second workgroup record on the unicast subnet that we've already written out on one of the broadcast subnets. @@ -270,7 +269,7 @@ static uint32 write_this_workgroup_name( struct subnet_record *subrec, { struct subnet_record *ssub; - if(strequal(myworkgroup, work->work_group)) + if(strequal(global_myworkgroup, work->work_group)) return 0; /* This is a workgroup we have seen on a broadcast subnet. All @@ -358,10 +357,10 @@ void write_browse_list(time_t t, BOOL force_write) * subnet. */ - if((work = find_workgroup_on_subnet(FIRST_SUBNET, myworkgroup)) == NULL) + if((work = find_workgroup_on_subnet(FIRST_SUBNET, global_myworkgroup)) == NULL) { DEBUG(0,("write_browse_list: Fatal error - cannot find my workgroup %s\n", - myworkgroup)); + global_myworkgroup)); fclose(fp); return; } @@ -386,7 +385,7 @@ void write_browse_list(time_t t, BOOL force_write) stype = 0; for (subrec = FIRST_SUBNET; subrec ; subrec = NEXT_SUBNET_INCLUDING_UNICAST(subrec)) { - if((work = find_workgroup_on_subnet( subrec, myworkgroup )) == NULL) + if((work = find_workgroup_on_subnet( subrec, global_myworkgroup )) == NULL) continue; if((servrec = find_server_in_workgroup( work, my_netbios_names[i])) == NULL) continue; @@ -400,7 +399,7 @@ void write_browse_list(time_t t, BOOL force_write) fprintf(fp, "%08x ", stype); sprintf(tmp, "\"%s\" ", lp_serverstring()); fprintf(fp, "%-30s", tmp); - fprintf(fp, "\"%s\"\n", myworkgroup); + fprintf(fp, "\"%s\"\n", global_myworkgroup); } for (subrec = FIRST_SUBNET; subrec ; subrec = NEXT_SUBNET_INCLUDING_UNICAST(subrec)) |