svn commit: samba r15385 - branches/SAMBA_3_0/source/python
trunk/source/python
deryck at samba.org
deryck at samba.org
Mon May 1 22:31:35 GMT 2006
Author: deryck
Date: 2006-05-01 22:31:33 +0000 (Mon, 01 May 2006)
New Revision: 15385
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15385
Log:
Some work to bring the python code up to date with the
rpc client rewrite.
Modified:
branches/SAMBA_3_0/source/python/py_lsa.c
branches/SAMBA_3_0/source/python/py_lsa.h
branches/SAMBA_3_0/source/python/py_samr.c
branches/SAMBA_3_0/source/python/py_samr.h
branches/SAMBA_3_0/source/python/py_spoolss_drivers.c
branches/SAMBA_3_0/source/python/py_spoolss_ports.c
branches/SAMBA_3_0/source/python/py_spoolss_printerdata.c
branches/SAMBA_3_0/source/python/py_spoolss_printers.c
branches/SAMBA_3_0/source/python/py_srvsvc.c
trunk/source/python/py_lsa.c
trunk/source/python/py_lsa.h
trunk/source/python/py_samr.c
trunk/source/python/py_samr.h
trunk/source/python/py_spoolss_drivers.c
trunk/source/python/py_spoolss_ports.c
trunk/source/python/py_spoolss_printerdata.c
trunk/source/python/py_spoolss_printers.c
trunk/source/python/py_srvsvc.c
Changeset:
Modified: branches/SAMBA_3_0/source/python/py_lsa.c
===================================================================
--- branches/SAMBA_3_0/source/python/py_lsa.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ branches/SAMBA_3_0/source/python/py_lsa.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -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 @@
}
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) {
Modified: branches/SAMBA_3_0/source/python/py_lsa.h
===================================================================
--- branches/SAMBA_3_0/source/python/py_lsa.h 2006-05-01 22:07:12 UTC (rev 15384)
+++ branches/SAMBA_3_0/source/python/py_lsa.h 2006-05-01 22:31:33 UTC (rev 15385)
@@ -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;
Modified: branches/SAMBA_3_0/source/python/py_samr.c
===================================================================
--- branches/SAMBA_3_0/source/python/py_samr.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ branches/SAMBA_3_0/source/python/py_samr.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -569,7 +569,7 @@
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);
Modified: branches/SAMBA_3_0/source/python/py_samr.h
===================================================================
--- branches/SAMBA_3_0/source/python/py_samr.h 2006-05-01 22:07:12 UTC (rev 15384)
+++ branches/SAMBA_3_0/source/python/py_samr.h 2006-05-01 22:31:33 UTC (rev 15385)
@@ -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 {
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 {
PyObject_HEAD
- struct cli_state *cli;
+ struct rpc_pipe_client *cli;
TALLOC_CTX *mem_ctx;
POLICY_HND user_pol;
} samr_user_hnd_object;
Modified: branches/SAMBA_3_0/source/python/py_spoolss_drivers.c
===================================================================
--- branches/SAMBA_3_0/source/python/py_spoolss_drivers.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ branches/SAMBA_3_0/source/python/py_spoolss_drivers.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -70,7 +70,7 @@
}
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 @@
}
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 @@
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));
Modified: branches/SAMBA_3_0/source/python/py_spoolss_ports.c
===================================================================
--- branches/SAMBA_3_0/source/python/py_spoolss_ports.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ branches/SAMBA_3_0/source/python/py_spoolss_ports.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -68,7 +68,7 @@
/* 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));
Modified: branches/SAMBA_3_0/source/python/py_spoolss_printerdata.c
===================================================================
--- branches/SAMBA_3_0/source/python/py_spoolss_printerdata.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ branches/SAMBA_3_0/source/python/py_spoolss_printerdata.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -321,7 +321,7 @@
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;
}
Modified: branches/SAMBA_3_0/source/python/py_spoolss_printers.c
===================================================================
--- branches/SAMBA_3_0/source/python/py_spoolss_printers.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ branches/SAMBA_3_0/source/python/py_spoolss_printers.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -69,7 +69,7 @@
}
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 @@
/* 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 @@
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;
Modified: branches/SAMBA_3_0/source/python/py_srvsvc.c
===================================================================
--- branches/SAMBA_3_0/source/python/py_srvsvc.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ branches/SAMBA_3_0/source/python/py_srvsvc.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -120,7 +120,7 @@
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));
Modified: trunk/source/python/py_lsa.c
===================================================================
--- trunk/source/python/py_lsa.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ trunk/source/python/py_lsa.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -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 @@
}
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) {
Modified: trunk/source/python/py_lsa.h
===================================================================
--- trunk/source/python/py_lsa.h 2006-05-01 22:07:12 UTC (rev 15384)
+++ trunk/source/python/py_lsa.h 2006-05-01 22:31:33 UTC (rev 15385)
@@ -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;
Modified: trunk/source/python/py_samr.c
===================================================================
--- trunk/source/python/py_samr.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ trunk/source/python/py_samr.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -569,7 +569,7 @@
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);
Modified: trunk/source/python/py_samr.h
===================================================================
--- trunk/source/python/py_samr.h 2006-05-01 22:07:12 UTC (rev 15384)
+++ trunk/source/python/py_samr.h 2006-05-01 22:31:33 UTC (rev 15385)
@@ -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 {
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 {
PyObject_HEAD
- struct cli_state *cli;
+ struct rpc_pipe_client *cli;
TALLOC_CTX *mem_ctx;
POLICY_HND user_pol;
} samr_user_hnd_object;
Modified: trunk/source/python/py_spoolss_drivers.c
===================================================================
--- trunk/source/python/py_spoolss_drivers.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ trunk/source/python/py_spoolss_drivers.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -70,7 +70,7 @@
}
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 @@
}
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 @@
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));
Modified: trunk/source/python/py_spoolss_ports.c
===================================================================
--- trunk/source/python/py_spoolss_ports.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ trunk/source/python/py_spoolss_ports.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -68,7 +68,7 @@
/* 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));
Modified: trunk/source/python/py_spoolss_printerdata.c
===================================================================
--- trunk/source/python/py_spoolss_printerdata.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ trunk/source/python/py_spoolss_printerdata.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -321,7 +321,7 @@
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;
}
Modified: trunk/source/python/py_spoolss_printers.c
===================================================================
--- trunk/source/python/py_spoolss_printers.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ trunk/source/python/py_spoolss_printers.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -69,7 +69,7 @@
}
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 @@
/* 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 @@
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;
Modified: trunk/source/python/py_srvsvc.c
===================================================================
--- trunk/source/python/py_srvsvc.c 2006-05-01 22:07:12 UTC (rev 15384)
+++ trunk/source/python/py_srvsvc.c 2006-05-01 22:31:33 UTC (rev 15385)
@@ -120,7 +120,7 @@
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));
More information about the samba-cvs
mailing list