summaryrefslogtreecommitdiff
path: root/source3/namedbwork.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/namedbwork.c')
-rw-r--r--source3/namedbwork.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/namedbwork.c b/source3/namedbwork.c
index 8c249cc82c..d752916815 100644
--- a/source3/namedbwork.c
+++ b/source3/namedbwork.c
@@ -40,6 +40,8 @@ extern struct subnet_record *subnetlist;
extern struct in_addr wins_ip;
+extern fstring myworkgroup;
+
int workgroup_count = 0; /* unique index key: one for each workgroup */
@@ -192,8 +194,8 @@ struct work_record *find_workgroupstruct(struct subnet_record *d,
if ((work = make_workgroup(name)))
{
if (!ip_equal(d->bcast_ip, wins_ip) &&
- lp_preferred_master() &&
- strequal(lp_workgroup(), name))
+ lp_preferred_master() && lp_local_master() &&
+ strequal(myworkgroup, name))
{
DEBUG(3, ("preferred master startup for %s\n", work->work_group));
work->needelection = True;