struct dssync_context *ctx,
const char *dn,
struct replUpToDateVectorBlob *utdv,
- int32_t level,
+ int32_t *plevel,
union drsuapi_DsGetNCChangesRequest *preq)
{
NTSTATUS status;
uint32_t count;
+ int32_t level;
union drsuapi_DsGetNCChangesRequest req;
struct dom_sid null_sid;
enum drsuapi_DsExtendedOperation extended_op;
ZERO_STRUCT(null_sid);
ZERO_STRUCT(req);
+ if (ctx->remote_info28.supported_extensions
+ & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8)
+ {
+ level = 8;
+ } else {
+ level = 5;
+ }
+
nc = TALLOC_ZERO_P(mem_ctx, struct drsuapi_DsReplicaObjectIdentifier);
if (!nc) {
status = NT_STATUS_NO_MEMORY;
goto fail;
}
+ if (plevel) {
+ *plevel = level;
+ }
+
if (preq) {
*preq = req;
}
goto out;
}
- if (ctx->remote_info28.supported_extensions
- & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8)
- {
- level = 8;
- } else {
- level = 5;
- }
-
if (ctx->single && ctx->object_dn) {
dn = ctx->object_dn;
} else {
dn = ctx->nc_dn;
}
- status = libnet_dssync_build_request(mem_ctx, ctx, dn, old_utdv, level,
+ status = libnet_dssync_build_request(mem_ctx, ctx, dn, old_utdv, &level,
&req);
if (!NT_STATUS_IS_OK(status)) {
goto out;