summaryrefslogtreecommitdiff
path: root/source3/namedbsubnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/namedbsubnet.c')
-rw-r--r--source3/namedbsubnet.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/namedbsubnet.c b/source3/namedbsubnet.c
index 5ede7b0b81..6b187b21bb 100644
--- a/source3/namedbsubnet.c
+++ b/source3/namedbsubnet.c
@@ -272,18 +272,22 @@ struct subnet_record *add_subnet_entry(struct in_addr bcast_ip,
void write_browse_list(void)
{
struct subnet_record *d;
-
pstring fname,fnamenew;
FILE *f;
+
+ static time_t lasttime = 0;
+ time_t t = time(NULL);
+
+ if (!lasttime) lasttime = t;
+ if (!updatedlists || t - lasttime < 5) return;
- if (!updatedlists) return;
+ lasttime = t;
+ updatedlists = False;
+ updatecount++;
dump_names();
dump_workgroups();
- updatedlists = False;
- updatecount++;
-
strcpy(fname,lp_lockdir());
trim_string(fname,NULL,"/");
strcat(fname,"/");
@@ -337,4 +341,3 @@ void write_browse_list(void)
DEBUG(3,("Wrote browse list %s\n",fname));
}
-