diff options
Diffstat (limited to 'source4/libcli/wrepl')
-rw-r--r-- | source4/libcli/wrepl/winsrepl.c | 9 | ||||
-rw-r--r-- | source4/libcli/wrepl/winsrepl.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/source4/libcli/wrepl/winsrepl.c b/source4/libcli/wrepl/winsrepl.c index d027e88396..87e5282539 100644 --- a/source4/libcli/wrepl/winsrepl.c +++ b/source4/libcli/wrepl/winsrepl.c @@ -102,7 +102,7 @@ static NTSTATUS wrepl_finish_recv(void *private, DATA_BLOB packet_blob_in) blob.length = packet_blob_in.length - 4; /* we have a full request - parse it */ - ndr_err = ndr_pull_struct_blob(&blob, req->packet, lp_iconv_convenience(global_loadparm), req->packet, + ndr_err = ndr_pull_struct_blob(&blob, req->packet, wrepl_socket->iconv_convenience, req->packet, (ndr_pull_flags_fn_t)ndr_pull_wrepl_packet); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS status = ndr_map_error2ntstatus(ndr_err); @@ -163,7 +163,8 @@ static int wrepl_socket_destructor(struct wrepl_socket *sock) operations will use that event context */ struct wrepl_socket *wrepl_socket_init(TALLOC_CTX *mem_ctx, - struct event_context *event_ctx) + struct event_context *event_ctx, + struct smb_iconv_convenience *iconv_convenience) { struct wrepl_socket *wrepl_socket; NTSTATUS status; @@ -178,6 +179,8 @@ struct wrepl_socket *wrepl_socket_init(TALLOC_CTX *mem_ctx, } if (!wrepl_socket->event.ctx) goto failed; + wrepl_socket->iconv_convenience = iconv_convenience; + status = socket_create("ip", SOCKET_TYPE_STREAM, &wrepl_socket->sock, 0); if (!NT_STATUS_IS_OK(status)) goto failed; @@ -493,7 +496,7 @@ struct wrepl_request *wrepl_request_send(struct wrepl_socket *wrepl_socket, } wrap.packet = *packet; - ndr_err = ndr_push_struct_blob(&blob, req, lp_iconv_convenience(global_loadparm), &wrap, + ndr_err = ndr_push_struct_blob(&blob, req, wrepl_socket->iconv_convenience, &wrap, (ndr_push_flags_fn_t)ndr_push_wrepl_wrap); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/libcli/wrepl/winsrepl.h b/source4/libcli/wrepl/winsrepl.h index 52b0bee69e..f33e63119d 100644 --- a/source4/libcli/wrepl/winsrepl.h +++ b/source4/libcli/wrepl/winsrepl.h @@ -49,6 +49,8 @@ struct wrepl_socket { /* remember if we need to free the wrepl_socket at the end of wrepl_socket_dead() */ bool free_skipped; + + struct smb_iconv_convenience *iconv_convenience; }; struct wrepl_send_ctrl { |