r12531: 'make quicktest' was taking 15 minutes on my system due to failing DNS
authorAndrew Tridgell <tridge@samba.org>
Wed, 28 Dec 2005 03:04:40 +0000 (03:04 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:47:52 +0000 (13:47 -0500)
commite4dbcc0d5d6c9c68a7f3c437611b726f9f0211cf
treecc0456ffcb6dbb4627dd84048f2a22c5efe2a162
parent1f700876633c1f96bfc38d366dd0d5571aaa8696
r12531: 'make quicktest' was taking 15 minutes on my system due to failing DNS
lookups in load_interfaces(). The reason was my eth0 interface was
down, and it was being interpreted as a DNS name.

This patch changes load_interfaces() to happening automatically when
interfaces are first needed instead of on the startup of every samba
binary. This means that (for example) ldbadd doesn't call
load_interfaces(), which means no slow DNS lookups.

I also reduced the number of static globals in interface.c to 1, and
changed from malloc to talloc

When you want to force a reload of the interfaces list, you now call
unload_interfaces(), which means the next call that needs the
interfaces list will reload it
(This used to be commit f79d90bd1364b970adb2981b2572e77066431f1e)
13 files changed:
source4/client/smbmount.c
source4/client/smbspool.c
source4/gtk/tools/gepdump.c
source4/gtk/tools/gregedit.c
source4/gtk/tools/gwcrontab.c
source4/gtk/tools/gwsam.c
source4/lib/cmdline/popt_common.c
source4/lib/netif/interface.c
source4/scripting/ejs/smbcalls_config.c
source4/torture/gentest.c
source4/torture/locktest.c
source4/torture/locktest2.c
source4/torture/masktest.c