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:
committed by
Gerald (Jerry) Carter
parent
90129b081e
commit
f79d90bd13
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user