diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-12-28 03:04:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:52 -0500 |
commit | e4dbcc0d5d6c9c68a7f3c437611b726f9f0211cf (patch) | |
tree | cc0456ffcb6dbb4627dd84048f2a22c5efe2a162 /source4/client | |
parent | 1f700876633c1f96bfc38d366dd0d5571aaa8696 (diff) | |
download | samba-e4dbcc0d5d6c9c68a7f3c437611b726f9f0211cf.tar.gz samba-e4dbcc0d5d6c9c68a7f3c437611b726f9f0211cf.tar.bz2 samba-e4dbcc0d5d6c9c68a7f3c437611b726f9f0211cf.zip |
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)
Diffstat (limited to 'source4/client')
-rw-r--r-- | source4/client/smbmount.c | 1 | ||||
-rw-r--r-- | source4/client/smbspool.c | 2 |
2 files changed, 0 insertions, 3 deletions
diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c index b2e6b9677f..4bfeae1e24 100644 --- a/source4/client/smbmount.c +++ b/source4/client/smbmount.c @@ -915,7 +915,6 @@ static void parse_mount_smb(int argc, char **argv) pstrcpy(workgroup,lp_workgroup()); } - load_interfaces(); if (!*my_netbios_name) { pstrcpy(my_netbios_name, myhostname()); } diff --git a/source4/client/smbspool.c b/source4/client/smbspool.c index cb95c0d5a3..26a42cb144 100644 --- a/source4/client/smbspool.c +++ b/source4/client/smbspool.c @@ -185,8 +185,6 @@ static int smb_print(struct smbcli_state *, char *, FILE *); if (workgroup == NULL) workgroup = lp_workgroup(); - load_interfaces(); - do { if ((cli = smb_connect(workgroup, server, printer, username, password)) == NULL) |