From a68eb378a584c638d81f2e1ec645a318e37f103f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 13 Apr 2010 09:07:21 +0200 Subject: s4:librpc/rpc: the python bindings should use !NT_STATUS_IS_OK instead of NT_STATUS_IS_ERR Everything but NT_STATUS_OK is an error here. metze --- source4/librpc/rpc/pyrpc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/librpc/rpc') diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c index 04565f2495..718c749ef8 100644 --- a/source4/librpc/rpc/pyrpc.c +++ b/source4/librpc/rpc/pyrpc.c @@ -60,7 +60,7 @@ static PyObject *py_dcerpc_run_function(dcerpc_InterfaceObject *iface, } status = md->call(iface->binding_handle, mem_ctx, r); - if (NT_STATUS_IS_ERR(status)) { + if (!NT_STATUS_IS_OK(status)) { PyErr_SetDCERPCStatus(iface->pipe, status); talloc_free(mem_ctx); return NULL; @@ -248,7 +248,7 @@ static PyObject *py_iface_request(PyObject *self, PyObject *args, PyObject *kwar status = dcerpc_request(iface->pipe, object?&object_guid:NULL, opnum, mem_ctx, &data_in, &data_out); - if (NT_STATUS_IS_ERR(status)) { + if (!NT_STATUS_IS_OK(status)) { PyErr_SetDCERPCStatus(iface->pipe, status); talloc_free(mem_ctx); return NULL; @@ -288,7 +288,7 @@ static PyObject *py_iface_alter_context(PyObject *self, PyObject *args, PyObject status = dcerpc_alter_context(iface->pipe, iface->pipe, &abstract_syntax, &transfer_syntax); - if (NT_STATUS_IS_ERR(status)) { + if (!NT_STATUS_IS_OK(status)) { PyErr_SetDCERPCStatus(iface->pipe, status); return NULL; } @@ -449,7 +449,7 @@ static PyObject *dcerpc_interface_new(PyTypeObject *self, PyObject *args, PyObje table, credentials, event_ctx, lp_ctx); } - if (NT_STATUS_IS_ERR(status)) { + if (!NT_STATUS_IS_OK(status)) { PyErr_SetDCERPCStatus(ret->pipe, status); talloc_free(mem_ctx); return NULL; -- cgit