Revert "Remove another use of global_loadparm."
authorStefan Metzmacher <metze@samba.org>
Sun, 18 Jan 2009 22:20:01 +0000 (23:20 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 19 Jan 2009 06:05:20 +0000 (07:05 +0100)
This reverts commit ee7c2170a79f1ca9e2ad1a209d342d8fd287ec8d.

A much more correct fix will come soon.
(40ef7739f4141598a6392c203e4a2d52d972fe06 from the samba4wins tree)

metze

libcli/nbt/libnbt.h
libcli/nbt/nbtsocket.c
libcli/nbt/pynbt.c

index 0c4420cd405c9957351a1ace06633f18e1736dc0..f5191656ed465863b57b408f36fa0625d4a0f787 100644 (file)
@@ -122,8 +122,6 @@ struct nbt_name_socket {
                                struct socket_address *);
                void *private_data;
        } unexpected;
-
-       uint32_t wack_timeout;
 };
 
 
index 780e2bbc8212e1b6157ba033ae4703bedf7e8e8f..083cef96e812a873af80a8ad1d88411cc9675a48 100644 (file)
@@ -247,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 = nbtsock->wack_timeout;
+               req->timeout = lp_parm_int(global_loadparm, NULL, "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);
@@ -334,7 +334,6 @@ _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;
index 63ee9bb01ffd4eb5ef3bba7c22d2b2f8f1b5ece3..9be6c79a8b23fe4784734037a45dd42fd1bcb512 100644 (file)
@@ -52,8 +52,7 @@ static PyObject *py_nbt_node_init(PyTypeObject *self, PyObject *args, PyObject *
                return NULL;
 
        ev = s4_event_context_init(ret->mem_ctx);
-       ret->socket = nbt_name_socket_init(ret->mem_ctx, ev, 
-                                                                          py_iconv_convenience(ret->mem_ctx));
+       ret->socket = nbt_name_socket_init(ret->mem_ctx, ev, py_iconv_convenience(ret->mem_ctx));
        return (PyObject *)ret;
 }