diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-22 22:33:34 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-22 22:33:34 +0200 |
commit | f1b76952c035ca6341e67d0ef1a14b655c4652a2 (patch) | |
tree | 004f0f852d5aca6eb685000b94e8d5d1b0b6d2a8 /source4/pidl/lib/Parse/Pidl | |
parent | f8dc2ca022951daa1e04360915e8d9deb2a5af5e (diff) | |
download | samba-f1b76952c035ca6341e67d0ef1a14b655c4652a2.tar.gz samba-f1b76952c035ca6341e67d0ef1a14b655c4652a2.tar.bz2 samba-f1b76952c035ca6341e67d0ef1a14b655c4652a2.zip |
Fix event context initialization for Python bindings.
(This used to be commit 132efc779ede27898765320a13bdde0b5256102b)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/Python.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm index e344589f8e..884ee1d822 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -599,6 +599,7 @@ sub Interface($$$) $self->pidl("struct loadparm_context *lp_ctx = NULL;"); $self->pidl("PyObject *py_lp_ctx = Py_None, *py_credentials = Py_None;"); $self->pidl("TALLOC_CTX *mem_ctx = NULL;"); + $self->pidl("struct event_context *event_ctx;"); $self->pidl("NTSTATUS status;"); $self->pidl(""); $self->pidl("const char *kwnames[] = {"); @@ -634,9 +635,11 @@ sub Interface($$$) $self->pidl("ret = PyObject_New($interface->{NAME}_InterfaceObject, &$interface->{NAME}_InterfaceType);"); $self->pidl(""); + $self->pidl("event_ctx = event_context_init(mem_ctx);"); + $self->pidl(""); $self->pidl("status = dcerpc_pipe_connect(NULL, &ret->pipe, binding_string, "); - $self->pidl(" &ndr_table_$interface->{NAME}, credentials, NULL, lp_ctx);"); + $self->pidl(" &ndr_table_$interface->{NAME}, credentials, event_ctx, lp_ctx);"); $self->handle_ntstatus("status", "NULL", "mem_ctx"); $self->pidl("ret->pipe->conn->flags |= DCERPC_NDR_REF_ALLOC;"); @@ -1020,6 +1023,7 @@ sub Parse($$$$$) #include \"librpc/rpc/dcerpc.h\" #include \"scripting/python/pytalloc.h\" #include \"scripting/python/pyrpc.h\" +#include \"lib/events/events.h\" #include \"$hdr\" #include \"$ndr_hdr\" #include \"$py_hdr\" |