summaryrefslogtreecommitdiff
path: root/source3/nameannounce.c
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>1997-11-21 14:01:23 +0000
committerJohn Terpstra <jht@samba.org>1997-11-21 14:01:23 +0000
commit4e92c7d1a3b543e48c2b09f8b78352a702c915aa (patch)
tree5d9f1b797b7111961abc58e00c5b696e76332158 /source3/nameannounce.c
parente8f3f79aa583bfe2996ae62bc899913275311281 (diff)
downloadsamba-4e92c7d1a3b543e48c2b09f8b78352a702c915aa.tar.gz
samba-4e92c7d1a3b543e48c2b09f8b78352a702c915aa.tar.bz2
samba-4e92c7d1a3b543e48c2b09f8b78352a702c915aa.zip
Added in mods for new smb.conf "remote browse sync" option as posted to
the samba-1.9.17 tree moments ago. (This used to be commit 2ee25cd117a116d0304960780d6c197f39d25a3d)
Diffstat (limited to 'source3/nameannounce.c')
-rw-r--r--source3/nameannounce.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/source3/nameannounce.c b/source3/nameannounce.c
index 03fab914de..28ebe5da90 100644
--- a/source3/nameannounce.c
+++ b/source3/nameannounce.c
@@ -516,5 +516,39 @@ void announce_remote(time_t t)
name,stype,comment);
}
}
+}
+
+/****************************************************************************
+ do all the "remote" browse synchronisation stuff.
+ These are used to put our browse lists into remote browse lists.
+ **************************************************************************/
+void browse_sync_remote(time_t t)
+{
+ char *s,*ptr;
+ static time_t last_time = 0;
+ pstring s2;
+ struct in_addr addr;
+
+ if (last_time && t < last_time + REMOTE_ANNOUNCE_INTERVAL)
+ return;
+
+ last_time = t;
+ s = lp_remote_browse_sync();
+ if (!*s) return;
+
+ for (ptr=s; next_token(&ptr,s2,NULL); )
+ {
+ /* the entries are of the form a.b.c.d */
+ int n;
+
+ addr = *interpret_addr2(s2);
+
+ /* Announce all our names including aliases */
+ for (n=0; my_netbios_names[n]; n++)
+ {
+ char *name = my_netbios_names[n];
+ do_announce_request(name, "*", ANN_MasterAnnouncement, 0x20, 0, addr);
+ }
+ }
}