summaryrefslogtreecommitdiff
path: root/source3/nameannounce.c
diff options
context:
space:
mode:
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);
+ }
+ }
}