summaryrefslogtreecommitdiff
path: root/source4/libcli/resolve/wins.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/resolve/wins.c')
-rw-r--r--source4/libcli/resolve/wins.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/libcli/resolve/wins.c b/source4/libcli/resolve/wins.c
index 78624ad81a..3ec180f332 100644
--- a/source4/libcli/resolve/wins.c
+++ b/source4/libcli/resolve/wins.c
@@ -29,6 +29,7 @@ struct resolve_wins_data {
const char **address_list;
struct interface *ifaces;
uint16_t nbt_port;
+ int nbt_timeout;
};
/**
@@ -42,7 +43,7 @@ struct composite_context *resolve_name_wins_send(
{
struct resolve_wins_data *wins_data = talloc_get_type(userdata, struct resolve_wins_data);
if (wins_data->address_list == NULL) return NULL;
- return resolve_name_nbtlist_send(mem_ctx, event_ctx, name, wins_data->address_list, wins_data->ifaces, wins_data->nbt_port, false, true);
+ return resolve_name_nbtlist_send(mem_ctx, event_ctx, name, wins_data->address_list, wins_data->ifaces, wins_data->nbt_port, wins_data->nbt_timeout, false, true);
}
/*
@@ -62,6 +63,7 @@ NTSTATUS resolve_name_wins(struct nbt_name *name,
const char **address_list,
struct interface *ifaces,
uint16_t nbt_port,
+ int nbt_timeout,
const char **reply_addr)
{
struct composite_context *c;
@@ -69,16 +71,18 @@ NTSTATUS resolve_name_wins(struct nbt_name *name,
wins_data->address_list = address_list;
wins_data->ifaces = ifaces;
wins_data->nbt_port = nbt_port;
+ wins_data->nbt_timeout = nbt_timeout;
c = resolve_name_wins_send(mem_ctx, NULL, wins_data, name);
return resolve_name_wins_recv(c, mem_ctx, reply_addr);
}
-bool resolve_context_add_wins_method(struct resolve_context *ctx, const char **address_list, struct interface *ifaces, uint16_t nbt_port)
+bool resolve_context_add_wins_method(struct resolve_context *ctx, const char **address_list, struct interface *ifaces, uint16_t nbt_port, int nbt_timeout)
{
struct resolve_wins_data *wins_data = talloc(ctx, struct resolve_wins_data);
wins_data->address_list = str_list_copy(wins_data, address_list);
wins_data->ifaces = talloc_reference(wins_data, ifaces);
wins_data->nbt_port = nbt_port;
+ wins_data->nbt_timeout = nbt_timeout;
return resolve_context_add_method(ctx, resolve_name_wins_send, resolve_name_wins_recv,
wins_data);
}
@@ -87,5 +91,5 @@ bool resolve_context_add_wins_method_lp(struct resolve_context *ctx, struct load
{
struct interface *ifaces;
load_interfaces(ctx, lp_interfaces(lp_ctx), &ifaces);
- return resolve_context_add_wins_method(ctx, lp_wins_server_list(lp_ctx), ifaces, lp_nbt_port(lp_ctx));
+ return resolve_context_add_wins_method(ctx, lp_wins_server_list(lp_ctx), ifaces, lp_nbt_port(lp_ctx), lp_parm_int(lp_ctx, NULL, "nbt", "timeout", 1));
}