summaryrefslogtreecommitdiff
path: root/source4/rpc_server/common
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-06-20 10:48:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:45 -0500
commit766d7dd2024c55faa46fd4b479c72fed40ef082a (patch)
treee9ecdf4d3072c87cce461977141d39d25fb25da1 /source4/rpc_server/common
parent62aabf5630b57090dfb1ca3d924459c3b44123c9 (diff)
downloadsamba-766d7dd2024c55faa46fd4b479c72fed40ef082a.tar.gz
samba-766d7dd2024c55faa46fd4b479c72fed40ef082a.tar.bz2
samba-766d7dd2024c55faa46fd4b479c72fed40ef082a.zip
r1205: Whoops - this should fix the build.
(This used to be commit e21f324937df2fe70b693112bd0b6fe6575d70ed)
Diffstat (limited to 'source4/rpc_server/common')
-rw-r--r--source4/rpc_server/common/common.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/rpc_server/common/common.h b/source4/rpc_server/common/common.h
index afc238f6b6..d3ae0db014 100644
--- a/source4/rpc_server/common/common.h
+++ b/source4/rpc_server/common/common.h
@@ -38,10 +38,13 @@
/* this checks for a valid policy handle, and gives a fault if an
invalid handle or NT_STATUS_INVALID_HANDLE if the handle is of the
wrong type */
-#define DCESRV_PULL_HANDLE(h, inhandle, t) do { \
+#define DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, retval) do { \
(h) = dcesrv_handle_fetch(dce_call->conn, (inhandle), DCESRV_HANDLE_ANY); \
DCESRV_CHECK_HANDLE(h); \
if ((t) != DCESRV_HANDLE_ANY && (h)->wire_handle.handle_type != (t)) { \
- return NT_STATUS_INVALID_HANDLE; \
+ return retval; \
} \
} while (0)
+
+#define DCESRV_PULL_HANDLE(h, inhandle, t) DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, NT_STATUS_INVALID_HANDLE)
+#define DCESRV_PULL_HANDLE_WERR(h, inhandle, t) DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, WERR_BADFID)