From aee979faaa45ee9b1f9ab20af3832d97fb74dcf2 Mon Sep 17 00:00:00 2001 From: Deryck Hodge Date: Mon, 1 May 2006 22:31:33 +0000 Subject: r15385: Some work to bring the python code up to date with the rpc client rewrite. (This used to be commit fd5bcecceb518d0683f400a61e11ce37f3d52d42) --- source3/python/py_lsa.c | 6 +++--- source3/python/py_lsa.h | 2 +- source3/python/py_samr.c | 2 +- source3/python/py_samr.h | 6 +++--- source3/python/py_spoolss_drivers.c | 6 +++--- source3/python/py_spoolss_ports.c | 2 +- source3/python/py_spoolss_printerdata.c | 2 +- source3/python/py_spoolss_printers.c | 6 +++--- source3/python/py_srvsvc.c | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) (limited to 'source3') diff --git a/source3/python/py_lsa.c b/source3/python/py_lsa.c index a4e8254e0d..915223a5bb 100644 --- a/source3/python/py_lsa.c +++ b/source3/python/py_lsa.c @@ -20,7 +20,7 @@ #include "python/py_lsa.h" -PyObject *new_lsa_policy_hnd_object(struct cli_state *cli, TALLOC_CTX *mem_ctx, +PyObject *new_lsa_policy_hnd_object(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol) { lsa_policy_hnd_object *o; @@ -90,14 +90,14 @@ static PyObject *lsa_open_policy(PyObject *self, PyObject *args, } ntstatus = rpccli_lsa_open_policy( - cli, mem_ctx, True, desired_access, &hnd); + cli->pipe_list, mem_ctx, True, desired_access, &hnd); if (!NT_STATUS_IS_OK(ntstatus)) { PyErr_SetObject(lsa_ntstatus, py_ntstatus_tuple(ntstatus)); goto done; } - result = new_lsa_policy_hnd_object(cli, mem_ctx, &hnd); + result = new_lsa_policy_hnd_object(cli->pipe_list, mem_ctx, &hnd); done: if (!result) { diff --git a/source3/python/py_lsa.h b/source3/python/py_lsa.h index 99f3de50b1..44a0b37b35 100644 --- a/source3/python/py_lsa.h +++ b/source3/python/py_lsa.h @@ -27,7 +27,7 @@ typedef struct { PyObject_HEAD - struct cli_state *cli; + struct rpc_pipe_client *cli; TALLOC_CTX *mem_ctx; POLICY_HND pol; } lsa_policy_hnd_object; diff --git a/source3/python/py_samr.c b/source3/python/py_samr.c index a26cd8d132..c448c4f89a 100644 --- a/source3/python/py_samr.c +++ b/source3/python/py_samr.c @@ -569,7 +569,7 @@ static PyObject *samr_connect(PyObject *self, PyObject *args, PyObject *kw) goto done; } - ntstatus = rpccli_samr_connect(cli, mem_ctx, desired_access, &hnd); + ntstatus = rpccli_samr_connect(cli->pipe_list, mem_ctx, desired_access, &hnd); if (!NT_STATUS_IS_OK(ntstatus)) { cli_shutdown(cli); diff --git a/source3/python/py_samr.h b/source3/python/py_samr.h index 8e91b1671e..9cde99e2d0 100644 --- a/source3/python/py_samr.h +++ b/source3/python/py_samr.h @@ -27,7 +27,7 @@ typedef struct { PyObject_HEAD - struct cli_state *cli; + struct rpc_pipe_client *cli; TALLOC_CTX *mem_ctx; POLICY_HND connect_pol; } samr_connect_hnd_object; @@ -36,7 +36,7 @@ typedef struct { typedef struct { PyObject_HEAD - struct cli_state *cli; + struct rpc_pipe_client *cli; TALLOC_CTX *mem_ctx; POLICY_HND domain_pol; } samr_domain_hnd_object; @@ -45,7 +45,7 @@ typedef struct { typedef struct { PyObject_HEAD - struct cli_state *cli; + struct rpc_pipe_client *cli; TALLOC_CTX *mem_ctx; POLICY_HND user_pol; } samr_user_hnd_object; diff --git a/source3/python/py_spoolss_drivers.c b/source3/python/py_spoolss_drivers.c index 3d7ca3a8fc..1ececf1e37 100644 --- a/source3/python/py_spoolss_drivers.c +++ b/source3/python/py_spoolss_drivers.c @@ -70,7 +70,7 @@ PyObject *spoolss_enumprinterdrivers(PyObject *self, PyObject *args, } werror = rpccli_spoolss_enumprinterdrivers( - cli, mem_ctx, level, arch, + cli->pipe_list, mem_ctx, level, arch, &num_drivers, &ctr); if (!W_ERROR_IS_OK(werror)) { @@ -263,7 +263,7 @@ PyObject *spoolss_getprinterdriverdir(PyObject *self, PyObject *args, } werror = rpccli_spoolss_getprinterdriverdir( - cli, mem_ctx, level, arch, &ctr); + cli->pipe_list, mem_ctx, level, arch, &ctr); if (!W_ERROR_IS_OK(werror)) { PyErr_SetObject(spoolss_werror, py_werror_tuple(werror)); @@ -361,7 +361,7 @@ PyObject *spoolss_addprinterdriver(PyObject *self, PyObject *args, goto done; } - werror = rpccli_spoolss_addprinterdriver(cli, mem_ctx, level, &ctr); + werror = rpccli_spoolss_addprinterdriver(cli->pipe_list, mem_ctx, level, &ctr); if (!W_ERROR_IS_OK(werror)) { PyErr_SetObject(spoolss_werror, py_werror_tuple(werror)); diff --git a/source3/python/py_spoolss_ports.c b/source3/python/py_spoolss_ports.c index 721ac956eb..96b81589f9 100644 --- a/source3/python/py_spoolss_ports.c +++ b/source3/python/py_spoolss_ports.c @@ -68,7 +68,7 @@ PyObject *spoolss_enumports(PyObject *self, PyObject *args, PyObject *kw) /* Call rpc function */ werror = rpccli_spoolss_enum_ports( - cli, mem_ctx, level, &num_ports, &ctr); + cli->pipe_list, mem_ctx, level, &num_ports, &ctr); if (!W_ERROR_IS_OK(werror)) { PyErr_SetObject(spoolss_werror, py_werror_tuple(werror)); diff --git a/source3/python/py_spoolss_printerdata.c b/source3/python/py_spoolss_printerdata.c index e89f985fef..ed9e1cbd82 100644 --- a/source3/python/py_spoolss_printerdata.c +++ b/source3/python/py_spoolss_printerdata.c @@ -321,7 +321,7 @@ PyObject *spoolss_hnd_enumprinterdataex(PyObject *self, PyObject *args, PyObject return NULL; if (!(ctr = TALLOC_ZERO_P(hnd->mem_ctx, REGVAL_CTR))) { - PyErr_SetObject(spoolss_werror, py_werror_tuple(werror)); + PyErr_SetString(spoolss_error, "talloc failed"); return NULL; } diff --git a/source3/python/py_spoolss_printers.c b/source3/python/py_spoolss_printers.c index 50c19fcf04..25cd051f3c 100644 --- a/source3/python/py_spoolss_printers.c +++ b/source3/python/py_spoolss_printers.c @@ -69,7 +69,7 @@ PyObject *spoolss_openprinter(PyObject *self, PyObject *args, PyObject *kw) } werror = rpccli_spoolss_open_printer_ex( - cli, mem_ctx, unc_name, "", desired_access, server, + cli->pipe_list, mem_ctx, unc_name, "", desired_access, server, "", &hnd); if (!W_ERROR_IS_OK(werror)) { @@ -327,7 +327,7 @@ PyObject *spoolss_enumprinters(PyObject *self, PyObject *args, PyObject *kw) /* Call rpc function */ werror = rpccli_spoolss_enum_printers( - cli, mem_ctx, name, flags, level, &num_printers, &ctr); + cli->pipe_list, mem_ctx, name, flags, level, &num_printers, &ctr); if (!W_ERROR_IS_OK(werror)) { PyErr_SetObject(spoolss_werror, py_werror_tuple(werror)); @@ -448,7 +448,7 @@ PyObject *spoolss_addprinterex(PyObject *self, PyObject *args, PyObject *kw) ctr.printers_2 = &info2; - werror = rpccli_spoolss_addprinterex(cli, mem_ctx, 2, &ctr); + werror = rpccli_spoolss_addprinterex(cli->pipe_list, mem_ctx, 2, &ctr); Py_INCREF(Py_None); result = Py_None; diff --git a/source3/python/py_srvsvc.c b/source3/python/py_srvsvc.c index 567572a9e5..03ed7fd84b 100644 --- a/source3/python/py_srvsvc.c +++ b/source3/python/py_srvsvc.c @@ -120,7 +120,7 @@ PyObject *srvsvc_netservergetinfo(PyObject *self, PyObject *args, ZERO_STRUCT(ctr); - status = rpccli_srvsvc_net_srv_get_info(cli, mem_ctx, level, &ctr); + status = rpccli_srvsvc_net_srv_get_info(cli->pipe_list, mem_ctx, level, &ctr); if (!NT_STATUS_IS_OK(status)) { PyErr_SetObject(srvsvc_error, py_werror_tuple(status)); -- cgit