summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-06 16:54:34 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:25 +0100
commit2f5ca872a80ad872ab864061f0c6982d8605393f (patch)
tree061592e4ae1e79adc57cd5d99ff2fd6f3b8c2549 /source4/lib
parentfb29325f1d4feba6c3f52b690d3da5d492618c4f (diff)
downloadsamba-2f5ca872a80ad872ab864061f0c6982d8605393f.tar.gz
samba-2f5ca872a80ad872ab864061f0c6982d8605393f.tar.bz2
samba-2f5ca872a80ad872ab864061f0c6982d8605393f.zip
r26313: Fix more uses of static loadparm.
(This used to be commit 6fd0d9d3b75546d08c24c513e05b1843d5777608)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/socket/interface.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c
index c220c4d890..a3f6ccc570 100644
--- a/source4/lib/socket/interface.c
+++ b/source4/lib/socket/interface.c
@@ -181,9 +181,9 @@ static void interpret_interface(const char *token,
/**
load the list of network interfaces
**/
-static void load_interfaces(void)
+static void load_interfaces(const char **interfaces)
{
- const char **ptr;
+ const char **ptr = interfaces;
int i;
struct iface_struct ifaces[MAX_INTERFACES];
struct in_addr loopback_ip;
@@ -193,7 +193,6 @@ static void load_interfaces(void)
return;
}
- ptr = lp_interfaces(global_loadparm);
loopback_ip = interpret_addr2("127.0.0.1");
/* probe the kernel for interfaces */
@@ -241,7 +240,7 @@ int iface_count(void)
int ret = 0;
struct interface *i;
- load_interfaces();
+ load_interfaces(lp_interfaces(global_loadparm));
for (i=local_interfaces;i;i=i->next)
ret++;
@@ -255,7 +254,7 @@ const char *iface_n_ip(int n)
{
struct interface *i;
- load_interfaces();
+ load_interfaces(lp_interfaces(global_loadparm));
for (i=local_interfaces;i && n;i=i->next)
n--;
@@ -273,7 +272,7 @@ const char *iface_n_bcast(int n)
{
struct interface *i;
- load_interfaces();
+ load_interfaces(lp_interfaces(global_loadparm));
for (i=local_interfaces;i && n;i=i->next)
n--;
@@ -291,7 +290,7 @@ const char *iface_n_netmask(int n)
{
struct interface *i;
- load_interfaces();
+ load_interfaces(lp_interfaces(global_loadparm));
for (i=local_interfaces;i && n;i=i->next)
n--;
@@ -311,7 +310,7 @@ const char *iface_best_ip(const char *dest)
struct interface *iface;
struct in_addr ip;
- load_interfaces();
+ load_interfaces(lp_interfaces(global_loadparm));
ip.s_addr = interpret_addr(dest);
iface = iface_find(ip, true);
@@ -328,7 +327,7 @@ bool iface_is_local(const char *dest)
{
struct in_addr ip;
- load_interfaces();
+ load_interfaces(lp_interfaces(global_loadparm));
ip.s_addr = interpret_addr(dest);
if (iface_find(ip, true)) {