1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-30 08:23:49 +03:00

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 commit is contained in:
Andrew Tridgell
2005-12-28 03:04:40 +00:00
committed by Gerald (Jerry) Carter
parent 90129b081e
commit f79d90bd13
13 changed files with 42 additions and 73 deletions

View File

@@ -188,7 +188,7 @@ static int ejs_lpReload(MprVarHandle eid, int argc, char **argv)
{
BOOL ret = lp_load();
if (ret) {
load_interfaces();
unload_interfaces();
}
mpr_Return(eid, mprCreateBoolVar(ret));
return 0;