summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-29 12:45:46 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-29 12:45:46 +0100
commitc8011b5d09390318ea6aa5639a142797128e5dab (patch)
treefb14b7ecce720dbc4fbba831a8fab045b9ac5f5c /source4/libcli/nbt
parentbc1a369a0ed254ede591b65756d75568c45549ea (diff)
parentde4a2214efb3fcc1aa04664371983dbc768eaf79 (diff)
downloadsamba-c8011b5d09390318ea6aa5639a142797128e5dab.tar.gz
samba-c8011b5d09390318ea6aa5639a142797128e5dab.tar.bz2
samba-c8011b5d09390318ea6aa5639a142797128e5dab.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts: source/scripting/python/config.mk (This used to be commit 0ac0ea660ab63eca764149f1d2828d0238a57289)
Diffstat (limited to 'source4/libcli/nbt')
-rw-r--r--source4/libcli/nbt/libnbt.h1
-rw-r--r--source4/libcli/nbt/nbtsocket.c10
2 files changed, 7 insertions, 4 deletions
diff --git a/source4/libcli/nbt/libnbt.h b/source4/libcli/nbt/libnbt.h
index c95d99db54..bc85d87b89 100644
--- a/source4/libcli/nbt/libnbt.h
+++ b/source4/libcli/nbt/libnbt.h
@@ -94,6 +94,7 @@ struct nbt_name_request {
struct nbt_name_socket {
struct socket_context *sock;
struct event_context *event_ctx;
+ struct smb_iconv_convenience *iconv_convenience;
/* a queue of requests pending to be sent */
struct nbt_name_request *send_queue;
diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c
index 8bfe746294..95a1643efc 100644
--- a/source4/libcli/nbt/nbtsocket.c
+++ b/source4/libcli/nbt/nbtsocket.c
@@ -190,7 +190,7 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock)
}
/* parse the request */
- ndr_err = ndr_pull_struct_blob(&blob, packet, lp_iconv_convenience(global_loadparm), packet,
+ ndr_err = ndr_pull_struct_blob(&blob, packet, nbtsock->iconv_convenience, packet,
(ndr_pull_flags_fn_t)ndr_pull_nbt_name_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
@@ -309,7 +309,8 @@ static void nbt_name_socket_handler(struct event_context *ev, struct fd_event *f
then operations will use that event context
*/
_PUBLIC_ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
- struct event_context *event_ctx)
+ struct event_context *event_ctx,
+ struct smb_iconv_convenience *iconv_convenience)
{
struct nbt_name_socket *nbtsock;
NTSTATUS status;
@@ -338,6 +339,7 @@ _PUBLIC_ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
nbtsock->num_pending = 0;
nbtsock->incoming.handler = NULL;
nbtsock->unexpected.handler = NULL;
+ nbtsock->iconv_convenience = iconv_convenience;
nbtsock->fde = event_add_fd(nbtsock->event_ctx, nbtsock,
socket_get_fd(nbtsock->sock), 0,
@@ -395,7 +397,7 @@ struct nbt_name_request *nbt_name_request_send(struct nbt_name_socket *nbtsock,
talloc_set_destructor(req, nbt_name_request_destructor);
ndr_err = ndr_push_struct_blob(&req->encoded, req,
- lp_iconv_convenience(global_loadparm),
+ req->nbtsock->iconv_convenience,
request,
(ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) goto failed;
@@ -444,7 +446,7 @@ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
}
ndr_err = ndr_push_struct_blob(&req->encoded, req,
- lp_iconv_convenience(global_loadparm),
+ req->nbtsock->iconv_convenience,
request,
(ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {