Remove another use of global_loadparm.
[jra/samba/.git] / libcli / nbt / nbtsocket.c
index 520e9d978a014758c319f1b5b23f6a60eb1e3b0d..65ed8725331c7ed70e4e46a082fc3361fbcf48b7 100644 (file)
@@ -23,6 +23,7 @@
 #include "lib/events/events.h"
 #include "../lib/util/dlinklist.h"
 #include "../libcli/nbt/libnbt.h"
+#include "../libcli/nbt/nbt_proto.h"
 #include "lib/socket/socket.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
 #include "param/param.h"
@@ -246,7 +247,7 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock)
                req->received_wack = true;
                /* although there can be a timeout in the packet, w2k3 screws it up,
                   so better to set it ourselves */
-               req->timeout = lp_parm_int(global_loadparm, NULL, "nbt", "wack_timeout", 30);
+               req->timeout = nbtsock->wack_timeout;
                req->te = event_add_timed(req->nbtsock->event_ctx, req,
                                          timeval_current_ofs(req->timeout, 0),
                                          nbt_name_socket_timeout, req);
@@ -333,6 +334,7 @@ _PUBLIC_ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
 
        nbtsock->send_queue = NULL;
        nbtsock->num_pending = 0;
+       nbtsock->wack_timeout = 30;
        nbtsock->incoming.handler = NULL;
        nbtsock->unexpected.handler = NULL;
        nbtsock->iconv_convenience = iconv_convenience;