summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-04-02 20:57:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:23 -0500
commit3b8c824c16a7649057c87fd33ac17d496976bdfb (patch)
tree6584c2f3c4f98c5c2107228df9e6b5f44b10471b /source4/librpc/ndr/ndr.c
parent3abce73193dcc393fee5ca6e326678009e87cbd7 (diff)
downloadsamba-3b8c824c16a7649057c87fd33ac17d496976bdfb.tar.gz
samba-3b8c824c16a7649057c87fd33ac17d496976bdfb.tar.bz2
samba-3b8c824c16a7649057c87fd33ac17d496976bdfb.zip
r6180: Use token_lists for storing switch values
(This used to be commit f66e11137eed69b44f0739f1064625cbd96243bd)
Diffstat (limited to 'source4/librpc/ndr/ndr.c')
-rw-r--r--source4/librpc/ndr/ndr.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index de8a01f5d5..de87f0850a 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -324,23 +324,6 @@ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr)
talloc_free(ndr);
}
-
-/*
- a useful helper function for printing idl unions via DEBUG()
-*/
-void ndr_print_union_debug(ndr_print_union_fn_t fn, const char *name, uint32_t level, void *ptr)
-{
- struct ndr_print *ndr;
-
- ndr = talloc(NULL, struct ndr_print);
- if (!ndr) return;
- ndr->print = ndr_print_debug_helper;
- ndr->depth = 1;
- ndr->flags = 0;
- fn(ndr, name, level, ptr);
- talloc_free(ndr);
-}
-
/*
a useful helper function for printing idl function calls via DEBUG()
*/
@@ -690,6 +673,19 @@ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p)
return ndr_token_peek(&ndr->switch_list, p);
}
+NTSTATUS ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val)
+{
+ return ndr_token_store(ndr, &ndr->switch_list, p, val);
+}
+
+/*
+ retrieve a switch value
+ */
+uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p)
+{
+ return ndr_token_peek(&ndr->switch_list, p);
+}
+
/*
pull a relative object - stage1
called during SCALARS processing