summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-11 22:23:14 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:32 +0100
commit6f2252dace1629d7b5c5637b103caa28d2c89b07 (patch)
treefc09abaf04401ef510d55866066738840d052ebf /source4/scripting/ejs
parentf9948d18d73fb8d8711c3b5a46b1d83c881a0084 (diff)
downloadsamba-6f2252dace1629d7b5c5637b103caa28d2c89b07.tar.gz
samba-6f2252dace1629d7b5c5637b103caa28d2c89b07.tar.bz2
samba-6f2252dace1629d7b5c5637b103caa28d2c89b07.zip
r26401: Don't cache interfaces context in libnetif.
(This used to be commit 9f975417cc66bfd4589da38bfd23731dbe0e6153)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/smbcalls_config.c3
-rw-r--r--source4/scripting/ejs/smbcalls_sys.c9
2 files changed, 7 insertions, 5 deletions
diff --git a/source4/scripting/ejs/smbcalls_config.c b/source4/scripting/ejs/smbcalls_config.c
index 88c153ead3..07e0f479da 100644
--- a/source4/scripting/ejs/smbcalls_config.c
+++ b/source4/scripting/ejs/smbcalls_config.c
@@ -199,9 +199,6 @@ static int ejs_lpReload(MprVarHandle eid, int argc, char **argv)
const char *filename = lp_configfile(global_loadparm);
ret = lp_load(global_loadparm, filename);
- if (ret) {
- unload_interfaces();
- }
mpr_Return(eid, mprCreateBoolVar(ret));
return 0;
}
diff --git a/source4/scripting/ejs/smbcalls_sys.c b/source4/scripting/ejs/smbcalls_sys.c
index 86e0873e09..cc1c3b4e32 100644
--- a/source4/scripting/ejs/smbcalls_sys.c
+++ b/source4/scripting/ejs/smbcalls_sys.c
@@ -32,10 +32,15 @@
*/
static int ejs_sys_interfaces(MprVarHandle eid, int argc, struct MprVar **argv)
{
- int i, count = iface_count(global_loadparm);
+ int i, count;
struct MprVar ret = mprArray("interfaces");
+ struct interface *ifaces;
+
+ load_interfaces(lp_interfaces(global_loadparm), &ifaces);
+
+ count = iface_count(ifaces);
for (i=0;i<count;i++) {
- mprAddArray(&ret, i, mprString(iface_n_ip(global_loadparm, i)));
+ mprAddArray(&ret, i, mprString(iface_n_ip(ifaces, i)));
}
mpr_Return(eid, ret);
return 0;