summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-31 07:23:11 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-31 07:23:11 +0000
commit5e20600e54a275d39e79f4547cb55c5946c14117 (patch)
tree8d5c0f9c839ec2bce6eab3129f0c5b04144adcc7
parent9076947b935fbeb13babf42974ff527ef916aabb (diff)
downloadsamba-5e20600e54a275d39e79f4547cb55c5946c14117.tar.gz
samba-5e20600e54a275d39e79f4547cb55c5946c14117.tar.bz2
samba-5e20600e54a275d39e79f4547cb55c5946c14117.zip
minor fixes to the DMB<->DMB sync code. We now get the dmb name from
the local_master name on the unicast subnet if it is unknown. (This used to be commit 222b6d90e09288091028f5e0435f1d4a74153f66)
-rw-r--r--source3/nmbd/nmbd_browsesync.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c
index b1fb4e631f..5969395ef7 100644
--- a/source3/nmbd/nmbd_browsesync.c
+++ b/source3/nmbd/nmbd_browsesync.c
@@ -585,21 +585,26 @@ void sync_all_dmbs(time_t t)
/* count how many syncs we might need to do */
for (work=unicast_subnet->workgrouplist; work; work = work->next) {
- if (strcmp(global_myworkgroup, work->work_group) &&
- !ip_equal(work->dmb_addr, ipzero)) {
+ if (strcmp(global_myworkgroup, work->work_group)) {
count++;
}
}
/* sync with a probability of 1/count */
for (work=unicast_subnet->workgrouplist; work; work = work->next) {
- if (strcmp(global_myworkgroup, work->work_group) &&
- !ip_equal(work->dmb_addr, ipzero)) {
-
+ if (strcmp(global_myworkgroup, work->work_group)) {
if (((unsigned)random()) % count != 0) continue;
lastrun = t;
+ if (!work->dmb_name.name[0]) {
+ /* we don't know the DMB - assume it is
+ the same as the unicast local master */
+ make_nmb_name(&work->dmb_name,
+ work->local_master_browser_name,
+ 0x20, scope);
+ }
+
DEBUG(3,("initiating DMB<->DMB sync with %s(%s)\n",
work->dmb_name.name,
inet_ntoa(work->dmb_addr)));