Use consistent names for dcerpc python modules; fixes messaging test.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 22 Dec 2008 03:03:55 +0000 (04:03 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 22 Dec 2008 03:03:55 +0000 (04:03 +0100)
source4/lib/messaging/pymessaging.c
source4/librpc/config.mk

index ad8f955466f4b396c5e62f24a32f4e950fee4fcc..7a5fdb34bff2e6896758d36f1d762ad06e773e98 100644 (file)
@@ -541,8 +541,12 @@ static bool irpc_AddNdrRpcMethods(PyTypeObject *ifacetype, const struct PyNdrRpc
 
 void initmessaging(void)
 {
-       extern void initirpc(void);
        PyObject *mod;
+       PyObject *dep_irpc;
+
+       dep_irpc = PyImport_ImportModule("samba.dcerpc.irpc");
+       if (dep_irpc == NULL)
+               return;
 
        if (PyType_Ready(&irpc_ClientConnectionType) < 0)
                return;
@@ -560,8 +564,6 @@ void initmessaging(void)
        if (mod == NULL)
                return;
 
-       initirpc();
-
        Py_INCREF((PyObject *)&irpc_ClientConnectionType);
        PyModule_AddObject(mod, "ClientConnection", (PyObject *)&irpc_ClientConnectionType);
 
index 8fe4bb5ee0651b41201403a8f4de7ddfb9606b61..7a543e923c6e6d99ff87af48bb65a1c71b182dce 100644 (file)
@@ -683,7 +683,7 @@ PRIVATE_DEPENDENCIES = dcerpc_atsvc PYTALLOC param swig_credentials  python_dcer
 python_atsvc_OBJ_FILES = ../librpc/gen_ndr/py_atsvc.o
 
 [PYTHON::python_dcerpc_nbt]
-LIBRARY_REALNAME = samba/nbt.$(SHLIBEXT)
+LIBRARY_REALNAME = samba/dcerpc/nbt.$(SHLIBEXT)
 PRIVATE_DEPENDENCIES = NDR_NBT PYTALLOC param swig_credentials python_dcerpc python_dcerpc_misc python_dcerpc_security
 
 python_dcerpc_nbt_OBJ_FILES = ../librpc/gen_ndr/py_nbt.o
@@ -725,7 +725,7 @@ PRIVATE_DEPENDENCIES = RPC_NDR_UNIXINFO PYTALLOC param swig_credentials python_d
 python_unixinfo_OBJ_FILES = ../librpc/gen_ndr/py_unixinfo.o
 
 [PYTHON::python_irpc]
-LIBRARY_REALNAME = samba/irpc.$(SHLIBEXT)
+LIBRARY_REALNAME = samba/dcerpc/irpc.$(SHLIBEXT)
 PRIVATE_DEPENDENCIES = RPC_NDR_IRPC PYTALLOC param swig_credentials python_dcerpc_security python_dcerpc_misc python_dcerpc python_dcerpc_nbt
 
 python_irpc_OBJ_FILES = $(gen_ndrsrcdir)/py_irpc.o