diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-12-28 03:04:40 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2005-12-28 03:04:40 +0000 |
commit | 814ff899fa817e2a3900629b5ed7d730307b270a (patch) | |
tree | 65510f8429fadde758a2d0d78430fb6f720cc3ed /source/scripting | |
parent | 343439c11e0972eb720cb8e4012a667bacf4684a (diff) | |
download | samba-814ff899fa817e2a3900629b5ed7d730307b270a.tar.gz samba-814ff899fa817e2a3900629b5ed7d730307b270a.tar.xz samba-814ff899fa817e2a3900629b5ed7d730307b270a.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
Diffstat (limited to 'source/scripting')
-rw-r--r-- | source/scripting/ejs/smbcalls_config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/scripting/ejs/smbcalls_config.c b/source/scripting/ejs/smbcalls_config.c index a64d57a3596..b0b1420ba2c 100644 --- a/source/scripting/ejs/smbcalls_config.c +++ b/source/scripting/ejs/smbcalls_config.c @@ -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; |