summaryrefslogtreecommitdiff
path: root/source4/libcli/wrepl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-21 17:17:37 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-21 17:17:37 +0100
commitc38c2765d1059b33f044a42c6555f3d10d339911 (patch)
treea97496f0b1cf0294900dfcad47675eef1b8f4ec8 /source4/libcli/wrepl
parentd63321a41e5e7d39a8a4e79a980cf92b1da7dfc0 (diff)
downloadsamba-c38c2765d1059b33f044a42c6555f3d10d339911.tar.gz
samba-c38c2765d1059b33f044a42c6555f3d10d339911.tar.bz2
samba-c38c2765d1059b33f044a42c6555f3d10d339911.zip
Remove yet more uses of global_loadparm.
(This used to be commit e01c1e87c0fe9709df7eb5b863f7ce85564174cd)
Diffstat (limited to 'source4/libcli/wrepl')
-rw-r--r--source4/libcli/wrepl/winsrepl.c9
-rw-r--r--source4/libcli/wrepl/winsrepl.h2
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 {