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)
commitf79d90bd1364b970adb2981b2572e77066431f1e
tree59593c97995b2f44ffb32ecc6f8b7749d0bd4fb0
parent90129b081e5bda3c69c3f01f53704b5d34817605
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
13 files changed:
source/client/smbmount.c
source/client/smbspool.c
source/gtk/tools/gepdump.c
source/gtk/tools/gregedit.c
source/gtk/tools/gwcrontab.c
source/gtk/tools/gwsam.c
source/lib/cmdline/popt_common.c
source/lib/netif/interface.c
source/scripting/ejs/smbcalls_config.c
source/torture/gentest.c
source/torture/locktest.c
source/torture/locktest2.c
source/torture/masktest.c