mirror of
https://github.com/samba-team/samba.git
synced 2025-10-22 07:33:16 +03:00
r26325: Remove use of global_loadparm in netif.
This commit is contained in:
committed by
Stefan Metzmacher
parent
8089283784
commit
e452cb2859
@@ -23,15 +23,16 @@
|
||||
#include "libcli/resolve/resolve.h"
|
||||
#include "system/network.h"
|
||||
#include "lib/socket/netif.h"
|
||||
#include "param/param.h"
|
||||
|
||||
/*
|
||||
/**
|
||||
broadcast name resolution method - async send
|
||||
*/
|
||||
struct composite_context *resolve_name_bcast_send(TALLOC_CTX *mem_ctx,
|
||||
struct event_context *event_ctx,
|
||||
struct nbt_name *name)
|
||||
{
|
||||
int num_interfaces = iface_count();
|
||||
int num_interfaces = iface_count(global_loadparm);
|
||||
const char **address_list;
|
||||
struct composite_context *c;
|
||||
int i, count=0;
|
||||
@@ -40,7 +41,7 @@ struct composite_context *resolve_name_bcast_send(TALLOC_CTX *mem_ctx,
|
||||
if (address_list == NULL) return NULL;
|
||||
|
||||
for (i=0;i<num_interfaces;i++) {
|
||||
const char *bcast = iface_n_bcast(i);
|
||||
const char *bcast = iface_n_bcast(global_loadparm, i);
|
||||
if (bcast == NULL) continue;
|
||||
address_list[count] = talloc_strdup(address_list, bcast);
|
||||
if (address_list[count] == NULL) {
|
||||
|
@@ -77,7 +77,7 @@ static void nbtlist_handler(struct nbt_name_request *req)
|
||||
/* favor a local address if possible */
|
||||
state->reply_addr = NULL;
|
||||
for (i=0;i<q->out.num_addrs;i++) {
|
||||
if (iface_is_local(q->out.reply_addrs[i])) {
|
||||
if (iface_is_local(global_loadparm, q->out.reply_addrs[i])) {
|
||||
state->reply_addr = talloc_steal(state,
|
||||
q->out.reply_addrs[i]);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user