libcli/nbt: fix wack timeout handling
authorStefan Metzmacher <metze@samba.org>
Sat, 17 Jan 2009 17:14:29 +0000 (18:14 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 19 Jan 2009 06:05:23 +0000 (07:05 +0100)
commitbbd74f2f760184b88341f35f2769b91480e8eb9d
treefcde709865f97838abf4a92dfe8c223f8fe76cb7
parent4a878115a70851ba77bc984c4313e95a608c5764
libcli/nbt: fix wack timeout handling

If the client gets a WACK response, the server
sends a timeout to the client. Possible
values are between 9 and 105 seconds.

Because w2k3 servers have a bug and always return
a value of 5 seconds, we need a workarround.

Always using a fixed value of 30 seconds is bad
as we could timeout to early.

Now we use the value from the server if it's in the
valid range and otherwise we use the upper limit
of the valid range (105s).

metze
(from samba4wins tree 40ef7739f4141598a6392c203e4a2d52d972fe06)
libcli/nbt/nbtsocket.c