summaryrefslogtreecommitdiff
path: root/source4/lib/messaging
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-05-09 17:20:01 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-05-18 11:45:30 +0200
commitf9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d (patch)
tree9a0a6cb6617d855c28eb891396898096c4214e88 /source4/lib/messaging
parente9f5bdf6b5a1aeb7e2e556cf41f7cbc2abed7856 (diff)
downloadsamba-f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d.tar.gz
samba-f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d.tar.bz2
samba-f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d.zip
Finish removal of iconv_convenience in public API's.
Diffstat (limited to 'source4/lib/messaging')
-rw-r--r--source4/lib/messaging/irpc.h2
-rw-r--r--source4/lib/messaging/messaging.c12
-rw-r--r--source4/lib/messaging/pymessaging.c4
-rw-r--r--source4/lib/messaging/tests/irpc.c2
-rw-r--r--source4/lib/messaging/tests/messaging.c5
5 files changed, 5 insertions, 20 deletions
diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h
index c82ad398ff..e7c0b874c1 100644
--- a/source4/lib/messaging/irpc.h
+++ b/source4/lib/messaging/irpc.h
@@ -97,11 +97,9 @@ NTSTATUS messaging_register_tmp(struct messaging_context *msg, void *private_dat
struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
const char *dir,
struct server_id server_id,
- struct smb_iconv_convenience *iconv_convenience,
struct tevent_context *ev);
struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx,
const char *dir,
- struct smb_iconv_convenience *iconv_convenience,
struct tevent_context *ev);
NTSTATUS messaging_send_ptr(struct messaging_context *msg, struct server_id server,
uint32_t msg_type, void *ptr);
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 3850bcbc49..19d6971088 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -47,7 +47,6 @@ struct messaging_context {
struct idr_context *dispatch_tree;
struct messaging_rec *pending;
struct messaging_rec *retry_queue;
- struct smb_iconv_convenience *iconv_convenience;
struct irpc_list *irpc;
struct idr_context *idr;
const char **names;
@@ -544,7 +543,6 @@ static int messaging_destructor(struct messaging_context *msg)
struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
const char *dir,
struct server_id server_id,
- struct smb_iconv_convenience *iconv_convenience,
struct tevent_context *ev)
{
struct messaging_context *msg;
@@ -573,7 +571,6 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
msg->base_path = talloc_reference(msg, dir);
msg->path = messaging_path(msg, server_id);
msg->server_id = server_id;
- msg->iconv_convenience = iconv_convenience;
msg->idr = idr_init(msg);
msg->dispatch_tree = idr_init(msg);
msg->start_time = timeval_current();
@@ -624,13 +621,12 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
*/
struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx,
const char *dir,
- struct smb_iconv_convenience *iconv_convenience,
struct tevent_context *ev)
{
struct server_id id;
ZERO_STRUCT(id);
id.id = random() % 0x10000000;
- return messaging_init(mem_ctx, dir, id, iconv_convenience, ev);
+ return messaging_init(mem_ctx, dir, id, ev);
}
/*
a list of registered irpc server functions
@@ -714,7 +710,7 @@ NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status)
m->header.status = status;
/* setup the reply */
- push = ndr_push_init_ctx(m->ndr, m->msg_ctx->iconv_convenience);
+ push = ndr_push_init_ctx(m->ndr);
if (push == NULL) {
status = NT_STATUS_NO_MEMORY;
goto failed;
@@ -814,7 +810,7 @@ static void irpc_handler(struct messaging_context *msg_ctx, void *private_data,
m->from = src;
- m->ndr = ndr_pull_init_blob(packet, m, msg_ctx->iconv_convenience);
+ m->ndr = ndr_pull_init_blob(packet, m);
if (m->ndr == NULL) goto failed;
m->ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
@@ -906,7 +902,7 @@ struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx,
header.status = NT_STATUS_OK;
/* construct the irpc packet */
- ndr = ndr_push_init_ctx(irpc, msg_ctx->iconv_convenience);
+ ndr = ndr_push_init_ctx(irpc);
if (ndr == NULL) goto failed;
ndr_err = ndr_push_irpc_header(ndr, NDR_SCALARS|NDR_BUFFERS, &header);
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index cea3accce0..ddcf945400 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -99,12 +99,10 @@ PyObject *py_messaging_connect(PyTypeObject *self, PyObject *args, PyObject *kwa
ret->msg_ctx = messaging_init(ret->mem_ctx,
messaging_path,
server_id,
- py_iconv_convenience(ret->mem_ctx),
ev);
} else {
ret->msg_ctx = messaging_client_init(ret->mem_ctx,
messaging_path,
- py_iconv_convenience(ret->mem_ctx),
ev);
}
@@ -355,12 +353,10 @@ PyObject *py_irpc_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs)
ret->msg_ctx = messaging_init(ret->mem_ctx,
messaging_path,
server_id,
- py_iconv_convenience(ret->mem_ctx),
ev);
} else {
ret->msg_ctx = messaging_client_init(ret->mem_ctx,
messaging_path,
- py_iconv_convenience(ret->mem_ctx),
ev);
}
diff --git a/source4/lib/messaging/tests/irpc.c b/source4/lib/messaging/tests/irpc.c
index 3eb23e0f7d..87a3c7a124 100644
--- a/source4/lib/messaging/tests/irpc.c
+++ b/source4/lib/messaging/tests/irpc.c
@@ -222,7 +222,6 @@ static bool irpc_setup(struct torture_context *tctx, void **_data)
messaging_init(tctx,
lp_messaging_path(tctx, tctx->lp_ctx),
cluster_id(0, MSG_ID1),
- lp_iconv_convenience(tctx->lp_ctx),
data->ev),
"Failed to init first messaging context");
@@ -230,7 +229,6 @@ static bool irpc_setup(struct torture_context *tctx, void **_data)
messaging_init(tctx,
lp_messaging_path(tctx, tctx->lp_ctx),
cluster_id(0, MSG_ID2),
- lp_iconv_convenience(tctx->lp_ctx),
data->ev),
"Failed to init second messaging context");
diff --git a/source4/lib/messaging/tests/messaging.c b/source4/lib/messaging/tests/messaging.c
index f61132caac..96cb180ff7 100644
--- a/source4/lib/messaging/tests/messaging.c
+++ b/source4/lib/messaging/tests/messaging.c
@@ -72,9 +72,7 @@ static bool test_ping_speed(struct torture_context *tctx)
ev = tctx->ev;
msg_server_ctx = messaging_init(tctx,
- lp_messaging_path(tctx, tctx->lp_ctx),
- cluster_id(0, 1),
- lp_iconv_convenience(tctx->lp_ctx),
+ lp_messaging_path(tctx, tctx->lp_ctx), cluster_id(0, 1),
ev);
torture_assert(tctx, msg_server_ctx != NULL, "Failed to init ping messaging context");
@@ -85,7 +83,6 @@ static bool test_ping_speed(struct torture_context *tctx)
msg_client_ctx = messaging_init(tctx,
lp_messaging_path(tctx, tctx->lp_ctx),
cluster_id(0, 2),
- lp_iconv_convenience(tctx->lp_ctx),
ev);
torture_assert(tctx, msg_client_ctx != NULL,