mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
s3: nmbd: Ensure we only set work_changed = true if we modify the record.
https://bugzilla.samba.org/show_bug.cgi?id=11254 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
20a7945a26
commit
db6572ef80
@ -327,12 +327,25 @@ a local master browser for workgroup %s and we think we are master. Forcing elec
|
||||
ttl, comment);
|
||||
} else {
|
||||
/* Update the record. */
|
||||
servrec->serv.type = servertype|SV_TYPE_LOCAL_LIST_ONLY;
|
||||
if (servrec->serv.type !=
|
||||
(servertype|SV_TYPE_LOCAL_LIST_ONLY)) {
|
||||
servrec->serv.type =
|
||||
servertype|SV_TYPE_LOCAL_LIST_ONLY;
|
||||
subrec->work_changed = true;
|
||||
}
|
||||
if (!strequal(servrec->serv.comment,comment)) {
|
||||
strlcpy(servrec->serv.comment,
|
||||
comment,
|
||||
sizeof(servrec->serv.comment));
|
||||
subrec->work_changed = true;
|
||||
}
|
||||
update_server_ttl(servrec, ttl);
|
||||
strlcpy(servrec->serv.comment,comment,sizeof(servrec->serv.comment));
|
||||
}
|
||||
|
||||
set_workgroup_local_master_browser_name( work, server_name );
|
||||
|
||||
if (!strequal(work->local_master_browser_name, server_name)) {
|
||||
set_workgroup_local_master_browser_name( work, server_name );
|
||||
subrec->work_changed = true;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* This server is announcing it is going down. Remove it from the
|
||||
@ -344,7 +357,6 @@ a local master browser for workgroup %s and we think we are master. Forcing elec
|
||||
}
|
||||
}
|
||||
|
||||
subrec->work_changed = True;
|
||||
done:
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user