diff options
-rw-r--r-- | source4/librpc/rpc/pyrpc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c index aebd484b49..a24c659a55 100644 --- a/source4/librpc/rpc/pyrpc.c +++ b/source4/librpc/rpc/pyrpc.c @@ -19,6 +19,7 @@ #include "includes.h" #include <Python.h> +#include <structmember.h> #include "librpc/rpc/pyrpc.h" #include "librpc/rpc/dcerpc.h" #include "lib/events/events.h" @@ -82,11 +83,18 @@ static PyObject *py_iface_server_name(PyObject *obj, void *closure) } static PyGetSetDef dcerpc_interface_getsetters[] = { - { discard_const_p(char, "server_name"), py_iface_server_name, NULL, + { discard_const_p(char, "server_name"), py_iface_server_name, NULL, discard_const_p(char, "name of the server, if connected over SMB") }, { NULL } }; +static PyMemberDef dcerpc_interface_members[] = { + { discard_const_p(char, "request_timeout"), T_INT, + offsetof(struct dcerpc_pipe, request_timeout), 0, + discard_const_p(char, "request timeout, in seconds") }, + { NULL } +}; + void PyErr_SetDCERPCStatus(struct dcerpc_pipe *p, NTSTATUS status) { if (p != NULL && NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) { @@ -282,6 +290,7 @@ PyTypeObject dcerpc_InterfaceType = { .tp_basicsize = sizeof(dcerpc_InterfaceObject), .tp_dealloc = dcerpc_interface_dealloc, .tp_getset = dcerpc_interface_getsetters, + .tp_members = dcerpc_interface_members, .tp_methods = dcerpc_interface_methods, .tp_doc = "ClientConnection(binding, syntax, lp_ctx=None, credentials=None) -> connection\n" "\n" |