summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-14 22:04:03 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-15 17:40:26 +0200
commit6467da77504779068a4e704b5951b7d595a76c09 (patch)
treef44bf35a713c5b7f8679845baedee2c9d0f7bae9 /source4
parent74974c0f5658df569c10f1838bf5bf22d4d40cbf (diff)
downloadsamba-6467da77504779068a4e704b5951b7d595a76c09.tar.gz
samba-6467da77504779068a4e704b5951b7d595a76c09.tar.bz2
samba-6467da77504779068a4e704b5951b7d595a76c09.zip
Rename Python wmi module to 'wmi' and fix some errors in it.
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/wmi/config.mk2
-rw-r--r--source4/lib/wmi/wmi.i (renamed from source4/lib/wmi/pywmi.i)23
2 files changed, 5 insertions, 20 deletions
diff --git a/source4/lib/wmi/config.mk b/source4/lib/wmi/config.mk
index 45e6f7c32f..2c40e34d32 100644
--- a/source4/lib/wmi/config.mk
+++ b/source4/lib/wmi/config.mk
@@ -45,7 +45,7 @@ librpc/gen_ndr/dcom_p.c: idl
[PYTHON::pywmi]
PUBLIC_DEPENDENCIES = LIBCLI_SMB NDR_MISC LIBSAMBA-UTIL LIBSAMBA-CONFIG WMI
-pywmi_OBJ_FILES = $(wmisrcdir)/pywmi_wrap.o
+pywmi_OBJ_FILES = $(wmisrcdir)/wmi_wrap.o
# End LIBRARY swig_dcerpc
#######################
diff --git a/source4/lib/wmi/pywmi.i b/source4/lib/wmi/wmi.i
index 1889e774ae..209cf76622 100644
--- a/source4/lib/wmi/pywmi.i
+++ b/source4/lib/wmi/wmi.i
@@ -18,11 +18,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-%module pywmi
+%module wmi
%include "typemaps.i"
+%include "libcli/util/errors.i"
%import "stdint.i"
-%import "libcli/util/errors.i"
%import "lib/talloc/talloc.i"
%runtime %{
@@ -53,7 +53,7 @@ void push_object(PyObject **stack, PyObject *o)
#include "librpc/rpc/dcerpc.h"
#include "lib/com/dcom/dcom.h"
#include "librpc/gen_ndr/com_dcom.h"
-#include "wmi/proto.h"
+#include "lib/wmi/wmi.h"
WERROR WBEM_ConnectServer(struct com_context *ctx, const char *server, const char *nspace, const char *user, const char *password,
@@ -326,22 +326,7 @@ WERROR IEnumWbemClassObject_SmartNext(struct IEnumWbemClassObject *d, TALLOC_CTX
mod_pywintypes = PyImport_ImportModule("pywintypes");
ComError = PyObject_GetAttrString(mod_pywintypes, "com_error");
- lp_load();
- dcerpc_init();
- dcerpc_table_init();
-
- dcom_proxy_IUnknown_init();
- dcom_proxy_IWbemLevel1Login_init();
- dcom_proxy_IWbemServices_init();
- dcom_proxy_IEnumWbemClassObject_init();
- dcom_proxy_IRemUnknown_init();
- dcom_proxy_IWbemFetchSmartEnum_init();
- dcom_proxy_IWbemWCOSmartEnum_init();
- dcom_proxy_IWbemClassObject_init();
-
- com_init_ctx(&com_ctx, NULL);
- dcom_client_init(com_ctx, NULL);
-
+ wmi_init(&com_ctx, NULL);
{
PyObject *pModule;