summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-31 06:59:23 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-31 06:59:23 +0000
commitf8ad53aa037b362b37592ca04b160cb81ccdecc8 (patch)
tree2d4ae0e94e6b39f85c90d9e28f0e2ae3fa0397c2 /source3/nmbd/nmbd.c
parent36bbc13fcdfafee3d9d8dd15a9ea84a55d444bdc (diff)
downloadsamba-f8ad53aa037b362b37592ca04b160cb81ccdecc8.tar.gz
samba-f8ad53aa037b362b37592ca04b160cb81ccdecc8.tar.bz2
samba-f8ad53aa037b362b37592ca04b160cb81ccdecc8.zip
I realised that my DMB<->DMB sync code has the property that the
amount of network traffic grows as the square of the number of workgroups. It probably wouldn't have caused problems but to be safe I changed the code to use random() to decrease the probability of a DMB<->DMB sync in proportion to the number of known workgroups. This keeps the nice browse connectivity while making the traffic rise only linearly with the number of workgroups. (This used to be commit 685f4ef2e1f83ab39e91229cf53a61eecb6181eb)
Diffstat (limited to 'source3/nmbd/nmbd.c')
-rw-r--r--source3/nmbd/nmbd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index feb9c2420e..72cc9408d5 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -567,6 +567,8 @@ int main(int argc,char *argv[])
StartupTime = time(NULL);
+ srandom(time(NULL) ^ getpid());
+
TimeInit();
pstrcpy( debugf, NMBLOGFILE );