diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-03 00:23:09 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-03 00:23:09 +0100 |
commit | c7dc53b8514f83800184d2b20b1897e54843a614 (patch) | |
tree | 4f09d783271dc5e38809ed02c8252d73f8b147e5 /source4/libcli/nbt | |
parent | 375df425c5014dc852995038e8e5668f98af8ba3 (diff) | |
parent | 85d53f7b603f7c15b007f8c3fdde1989f07a6eb2 (diff) | |
download | samba-c7dc53b8514f83800184d2b20b1897e54843a614.tar.gz samba-c7dc53b8514f83800184d2b20b1897e54843a614.tar.bz2 samba-c7dc53b8514f83800184d2b20b1897e54843a614.zip |
Merge branch 'v4-0-test' into id10ts-registry
(This used to be commit f98b59021a5ea39c7970ebc5520d17775e500b8c)
Diffstat (limited to 'source4/libcli/nbt')
-rw-r--r-- | source4/libcli/nbt/libnbt.h | 1 | ||||
-rw-r--r-- | source4/libcli/nbt/nbtsocket.c | 10 |
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)) { |