summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-14 07:20:46 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-14 07:20:46 +0000
commite8a3825ebc4dfe55581b980507384153b99f534d (patch)
treeebf5793643e9480956b345e93c395f9e5f8b3282 /source4/librpc/ndr/ndr.c
parent5b7f049829ec86f2ee50f6ba6443fa349aba84c2 (diff)
downloadsamba-e8a3825ebc4dfe55581b980507384153b99f534d.tar.gz
samba-e8a3825ebc4dfe55581b980507384153b99f534d.tar.bz2
samba-e8a3825ebc4dfe55581b980507384153b99f534d.zip
we can now do a level1 NetDfsEnum()
(This used to be commit f32641f73f7ff12b797378b3b533603ff1d526b5)
Diffstat (limited to 'source4/librpc/ndr/ndr.c')
-rw-r--r--source4/librpc/ndr/ndr.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 307f5988f8..3c2ed6e55b 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -337,3 +337,22 @@ NTSTATUS ndr_pull_error(struct ndr_pull *ndr, enum ndr_err_code err, const char
/* we should map to different status codes */
return NT_STATUS_INVALID_PARAMETER;
}
+
+/*
+ return and possibly log an NDR error
+*/
+NTSTATUS ndr_push_error(struct ndr_push *ndr, enum ndr_err_code err, const char *format, ...)
+{
+ char *s=NULL;
+ va_list ap;
+
+ va_start(ap, format);
+ vasprintf(&s, format, ap);
+ va_end(ap);
+
+ DEBUG(3,("ndr_push_error(%u): %s\n", err, s));
+
+ free(s);
+ /* we should map to different status codes */
+ return NT_STATUS_INVALID_PARAMETER;
+}