summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-12 14:10:24 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-15 09:34:04 +0200
commit61e53c078203ddb11c7f9f04492ade7d95d21f02 (patch)
tree7d3c58f867967d8e19bb6c421bf008f3f6ae22c3 /source4/librpc/rpc
parenta8e81c25ebe7a673c2c6e046dd6a0a829c4af409 (diff)
downloadsamba-61e53c078203ddb11c7f9f04492ade7d95d21f02.tar.gz
samba-61e53c078203ddb11c7f9f04492ade7d95d21f02.tar.bz2
samba-61e53c078203ddb11c7f9f04492ade7d95d21f02.zip
s4:librpc/rpc/pyrpc.c: map NT_STATUS_NET_WRITE_FAULT to the matching NT_STATUS_RPC_* code
metze
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/pyrpc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c
index 718c749ef8..10f1d4be25 100644
--- a/source4/librpc/rpc/pyrpc.c
+++ b/source4/librpc/rpc/pyrpc.c
@@ -207,14 +207,10 @@ static PyMemberDef dcerpc_interface_members[] = {
static void PyErr_SetDCERPCStatus(struct dcerpc_pipe *p, NTSTATUS status)
{
- if (p != NULL && NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
- const char *errstr = dcerpc_errstr(NULL, p->last_fault_code);
- PyErr_SetObject(PyExc_RuntimeError,
- Py_BuildValue("(i,s)", p->last_fault_code,
- errstr));
- } else {
- PyErr_SetNTSTATUS(status);
+ if (p && NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ status = dcerpc_fault_to_nt_status(p->last_fault_code);
}
+ PyErr_SetNTSTATUS(status);
}
static PyObject *py_iface_request(PyObject *self, PyObject *args, PyObject *kwargs)