From acf657a7c228a920efe942b8776bf1bb1446f59c Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 14 Oct 2004 13:09:59 +0000 Subject: r2975: Try to emulate NT_STATUS_IS_ERR() functionality for WERRORs. Unfortunately this means enumerating all the ones we don't think are errors. (This used to be commit a079e044f0ef23c6c4307c9da35019ec3e8f1d2a) --- source4/scripting/swig/dcerpc.i | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/scripting/swig/dcerpc.i b/source4/scripting/swig/dcerpc.i index 918445d7e3..f91f664820 100644 --- a/source4/scripting/swig/dcerpc.i +++ b/source4/scripting/swig/dcerpc.i @@ -286,7 +286,6 @@ PyObject *DATA_BLOB_to_python(DATA_BLOB obj) %} %include "samba.i" -%include "status_codes.i" %pythoncode %{ NTSTATUS = _dcerpc.NTSTATUS @@ -370,7 +369,8 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT, set_ntstatus_exception(NT_STATUS_V(result)); return NULL; } - if (!W_ERROR_IS_OK(arg3->out.result)) { + if (!W_ERROR_IS_OK(arg3->out.result) && + !(W_ERROR_EQUAL(arg3->out.result, WERR_INSUFFICIENT_BUFFER))) { set_werror_exception(W_ERROR_V(arg3->out.result)); return NULL; } @@ -378,3 +378,5 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT, %include "librpc/gen_ndr/winreg.i" %include "librpc/gen_ndr/spoolss.i" + +%include "status_codes.i" -- cgit