From 4e92c7d1a3b543e48c2b09f8b78352a702c915aa Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Fri, 21 Nov 1997 14:01:23 +0000 Subject: 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) --- source3/nameannounce.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'source3/nameannounce.c') 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); + } + } } -- cgit