summaryrefslogtreecommitdiff
path: root/source4/scripting/swig/dcerpc.i
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-10-15 07:17:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:54 -0500
commitdc2df2530fc729e5fa858fdab3c4355e27ece310 (patch)
treed4b930aac7dce227b6099ee521a31b96cf08cd73 /source4/scripting/swig/dcerpc.i
parent83928ac670bb17d4a1a8204d52468e5cca7c03d6 (diff)
downloadsamba-dc2df2530fc729e5fa858fdab3c4355e27ece310.tar.gz
samba-dc2df2530fc729e5fa858fdab3c4355e27ece310.tar.bz2
samba-dc2df2530fc729e5fa858fdab3c4355e27ece310.zip
r2986: Add correct value to dict when generating wrapper for functions that
return WERROR values. Clean up WERROR vs NTSTATUS handling a bit. (This used to be commit e6756e3ee0af3e7e98f6deaf9dc83af9aac1b586)
Diffstat (limited to 'source4/scripting/swig/dcerpc.i')
-rw-r--r--source4/scripting/swig/dcerpc.i8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/scripting/swig/dcerpc.i b/source4/scripting/swig/dcerpc.i
index f91f664820..5248164881 100644
--- a/source4/scripting/swig/dcerpc.i
+++ b/source4/scripting/swig/dcerpc.i
@@ -352,6 +352,7 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT,
%exception {
$action
+
if (NT_STATUS_IS_ERR(result)) {
set_ntstatus_exception(NT_STATUS_V(result));
return NULL;
@@ -365,10 +366,14 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT,
%exception {
$action
+
if (NT_STATUS_IS_ERR(result)) {
set_ntstatus_exception(NT_STATUS_V(result));
return NULL;
}
+
+ /* Emulate NT_STATUS_IS_ERR() */
+
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));
@@ -379,4 +384,7 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT,
%include "librpc/gen_ndr/winreg.i"
%include "librpc/gen_ndr/spoolss.i"
+/* The status codes must be included last otherwise the automatically
+ generated .i files get confused. This is kind of yucky. */
+
%include "status_codes.i"