diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-02-14 06:05:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:50 -0500 |
commit | 85fd954145ab9262d5e1930bb7a93d70663abe33 (patch) | |
tree | 52c23413a120cd59da9544e70c08f5f989ff3022 | |
parent | 205071ddc6c2140ee93ae3b4d93e06cddd585164 (diff) | |
download | samba-85fd954145ab9262d5e1930bb7a93d70663abe33.tar.gz samba-85fd954145ab9262d5e1930bb7a93d70663abe33.tar.bz2 samba-85fd954145ab9262d5e1930bb7a93d70663abe33.zip |
r5391: cope with w2k3 getting the timeout wrong in wack replies
(This used to be commit 75766603e325d515a718b1d1ab0f08160ea1f790)
-rw-r--r-- | source4/libcli/nbt/nbtsocket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c index dd14e76706..1d8cf36ea4 100644 --- a/source4/libcli/nbt/nbtsocket.c +++ b/source4/libcli/nbt/nbtsocket.c @@ -235,9 +235,9 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock) has received our request */ req->num_retries = 0; req->received_wack = True; - if (packet->answers[0].ttl != 0) { - req->timeout = MIN(packet->answers[0].ttl, 20); - } + /* although there can be a timeout in the packet, w2k3 screws it up, + so better to set it ourselves */ + req->timeout = lp_parm_int(-1, "nbt", "wack_timeout", 30); req->te = event_add_timed(req->nbtsock->event_ctx, req, timeval_current_ofs(req->timeout, 0), nbt_name_socket_timeout, req); |