summaryrefslogtreecommitdiff
path: root/libcli/nbt
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 /libcli/nbt
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 'libcli/nbt')
-rw-r--r--libcli/nbt/libnbt.h6
-rw-r--r--libcli/nbt/nbtname.c6
-rw-r--r--libcli/nbt/nbtsocket.c8
-rw-r--r--libcli/nbt/pynbt.c12
-rw-r--r--libcli/nbt/tools/nmblookup.c2
5 files changed, 14 insertions, 20 deletions
diff --git a/libcli/nbt/libnbt.h b/libcli/nbt/libnbt.h
index e150b35566..6165548320 100644
--- a/libcli/nbt/libnbt.h
+++ b/libcli/nbt/libnbt.h
@@ -95,7 +95,6 @@ struct nbt_name_request {
struct nbt_name_socket {
struct socket_context *sock;
struct tevent_context *event_ctx;
- struct smb_iconv_convenience *iconv_convenience;
/* a queue of requests pending to be sent */
struct nbt_name_request *send_queue;
@@ -275,8 +274,7 @@ struct nbt_name_release {
};
struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
- struct tevent_context *event_ctx,
- struct smb_iconv_convenience *iconv_convenience);
+ struct tevent_context *event_ctx);
void nbt_name_socket_handle_response_packet(struct nbt_name_request *req,
struct nbt_name_packet *packet,
struct socket_address *src);
@@ -294,7 +292,7 @@ NTSTATUS nbt_name_status(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_status *io);
NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_name *newname);
-NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, DATA_BLOB *blob, struct nbt_name *name);
+NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct nbt_name *name);
NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, struct nbt_name *name);
void nbt_choose_called_name(TALLOC_CTX *mem_ctx, struct nbt_name *n, const char *name, int type);
char *nbt_name_string(TALLOC_CTX *mem_ctx, const struct nbt_name *name);
diff --git a/libcli/nbt/nbtname.c b/libcli/nbt/nbtname.c
index 385905abf1..3f0a1228e7 100644
--- a/libcli/nbt/nbtname.c
+++ b/libcli/nbt/nbtname.c
@@ -381,11 +381,11 @@ _PUBLIC_ NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struc
/**
push a nbt name into a blob
*/
-_PUBLIC_ NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, DATA_BLOB *blob, struct nbt_name *name)
+_PUBLIC_ NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct nbt_name *name)
{
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(blob, mem_ctx, iconv_convenience, name, (ndr_push_flags_fn_t)ndr_push_nbt_name);
+ ndr_err = ndr_push_struct_blob(blob, mem_ctx, name, (ndr_push_flags_fn_t)ndr_push_nbt_name);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
}
@@ -400,7 +400,7 @@ _PUBLIC_ NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob,
{
enum ndr_err_code ndr_err;
- ndr_err = ndr_pull_struct_blob(blob, mem_ctx, NULL, name,
+ ndr_err = ndr_pull_struct_blob(blob, mem_ctx, name,
(ndr_pull_flags_fn_t)ndr_pull_nbt_name);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
diff --git a/libcli/nbt/nbtsocket.c b/libcli/nbt/nbtsocket.c
index d9bc72e499..2b792c5e2d 100644
--- a/libcli/nbt/nbtsocket.c
+++ b/libcli/nbt/nbtsocket.c
@@ -191,7 +191,7 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock)
}
/* parse the request */
- ndr_err = ndr_pull_struct_blob(&blob, packet, nbtsock->iconv_convenience, packet,
+ ndr_err = ndr_pull_struct_blob(&blob, packet, 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);
@@ -332,8 +332,7 @@ static void nbt_name_socket_handler(struct tevent_context *ev, struct tevent_fd
then operations will use that event context
*/
_PUBLIC_ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
- struct tevent_context *event_ctx,
- struct smb_iconv_convenience *iconv_convenience)
+ struct tevent_context *event_ctx)
{
struct nbt_name_socket *nbtsock;
NTSTATUS status;
@@ -358,7 +357,6 @@ _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,
@@ -416,7 +414,6 @@ 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,
- 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;
@@ -465,7 +462,6 @@ _PUBLIC_ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
}
ndr_err = ndr_push_struct_blob(&req->encoded, req,
- req->nbtsock->iconv_convenience,
request,
(ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c
index 425ad13c6d..dbb4d18237 100644
--- a/libcli/nbt/pynbt.c
+++ b/libcli/nbt/pynbt.c
@@ -52,7 +52,7 @@ static PyObject *py_nbt_node_init(PyTypeObject *self, PyObject *args, PyObject *
return NULL;
ev = s4_event_context_init(ret->mem_ctx);
- ret->socket = nbt_name_socket_init(ret->mem_ctx, ev, py_iconv_convenience(ret->mem_ctx));
+ ret->socket = nbt_name_socket_init(ret->mem_ctx, ev);
return (PyObject *)ret;
}
@@ -124,7 +124,7 @@ static bool PyObject_AsNBTName(PyObject *obj, struct nbt_name_socket *name_socke
return false;
}
-static PyObject *PyObject_FromNBTName(struct nbt_name_socket *name_socket, struct smb_iconv_convenience *ic,
+static PyObject *PyObject_FromNBTName(struct nbt_name_socket *name_socket,
struct nbt_name *name)
{
if (name->scope) {
@@ -175,7 +175,7 @@ static PyObject *py_nbt_name_query(PyObject *self, PyObject *args, PyObject *kwa
return NULL;
PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
- py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(node->socket), &io.out.name);
+ py_name = PyObject_FromNBTName(node->socket, &io.out.name);
if (py_name == NULL)
return NULL;
@@ -233,7 +233,7 @@ static PyObject *py_nbt_name_status(PyObject *self, PyObject *args, PyObject *kw
return NULL;
PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
- py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(NULL), &io.out.name);
+ py_name = PyObject_FromNBTName(node->socket, &io.out.name);
if (py_name == NULL)
return NULL;
@@ -296,7 +296,7 @@ static PyObject *py_nbt_name_register(PyObject *self, PyObject *args, PyObject *
return NULL;
PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
- py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(NULL), &io.out.name);
+ py_name = PyObject_FromNBTName(node->socket, &io.out.name);
if (py_name == NULL)
return NULL;
@@ -351,7 +351,7 @@ static PyObject *py_nbt_name_refresh(PyObject *self, PyObject *args, PyObject *k
return NULL;
PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
- py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(NULL), &io.out.name);
+ py_name = PyObject_FromNBTName(node->socket, &io.out.name);
if (py_name == NULL)
return NULL;
diff --git a/libcli/nbt/tools/nmblookup.c b/libcli/nbt/tools/nmblookup.c
index 96023f64c3..b756c1e30c 100644
--- a/libcli/nbt/tools/nmblookup.c
+++ b/libcli/nbt/tools/nmblookup.c
@@ -212,7 +212,7 @@ static bool process_one(struct loadparm_context *lp_ctx, struct tevent_context *
node_name = talloc_strdup(tmp_ctx, name);
}
- nbtsock = nbt_name_socket_init(tmp_ctx, ev, lp_iconv_convenience(lp_ctx));
+ nbtsock = nbt_name_socket_init(tmp_ctx, ev);
if (options.root_port) {
all_zero_addr = socket_address_from_strings(tmp_ctx, nbtsock->sock->backend_name,