summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-08-23 09:28:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:24 -0500
commit54a703d433cc586504bbdf445a03e3c3e0b4fe50 (patch)
treec1117bda43feae5b9809c3232869e92dcf70328c /source4/librpc/ndr
parent805c860f6b38bea4db7b39658b80207f55c97338 (diff)
downloadsamba-54a703d433cc586504bbdf445a03e3c3e0b4fe50.tar.gz
samba-54a703d433cc586504bbdf445a03e3c3e0b4fe50.tar.bz2
samba-54a703d433cc586504bbdf445a03e3c3e0b4fe50.zip
r9509: start to fix the pushing of drsuapi_DsAttributeValueDNString structs,
this uses a trick with talloc_get_type() to workaround using [value()] vars in [subcontext_size()] metze (This used to be commit 93065f2d3439bceeaa7c2a09679cc6d81472150d)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r--source4/librpc/ndr/ndr_drsuapi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/librpc/ndr/ndr_drsuapi.c b/source4/librpc/ndr/ndr_drsuapi.c
index 6f6dd74ea4..f220966b9d 100644
--- a/source4/librpc/ndr/ndr_drsuapi.c
+++ b/source4/librpc/ndr/ndr_drsuapi.c
@@ -61,3 +61,18 @@ void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const ch
ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "next_object", r->next_object);
}
}
+
+uint32_t _ndr_size_drsuapi_DsReplicaObjectIdentifier3(const void *ndr,
+ const struct drsuapi_DsAttributeValueDNString *dn,
+ const struct drsuapi_DsReplicaObjectIdentifier3 *id,
+ uint32_t flags)
+{
+ if (talloc_get_type(ndr, struct ndr_pull)) {
+ return dn->__ndr_size;
+ } else if (talloc_get_type(ndr, struct ndr_push)) {
+ return ndr_size_drsuapi_DsReplicaObjectIdentifier3(id, flags) + 2;
+ } else if (talloc_get_type(ndr, struct ndr_print)) {
+ return ndr_size_drsuapi_DsReplicaObjectIdentifier3(id, flags) + 2;
+ }
+ return 0;
+}