summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-01-11 04:12:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:40:19 -0500
commite8d2437cd570d8cbfaca7c07305831c29e260450 (patch)
treec200f380029737a57a9885ce95ad668d78dc3dcb /source4
parent310adf0faba0563b34e4a366c6364b9e887bd0e7 (diff)
downloadsamba-e8d2437cd570d8cbfaca7c07305831c29e260450.tar.gz
samba-e8d2437cd570d8cbfaca7c07305831c29e260450.tar.bz2
samba-e8d2437cd570d8cbfaca7c07305831c29e260450.zip
r20676: Add ref pointer to fix warning.
(This used to be commit 1afcf850679b6752935455a8f9198679649922b8)
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_become_dc.c14
-rw-r--r--source4/librpc/idl/drsuapi.idl6
-rw-r--r--source4/torture/rpc/drsuapi.c4
-rw-r--r--source4/torture/rpc/dssync.c16
4 files changed, 21 insertions, 19 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index 97be186f72..afc02c729c 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -1618,13 +1618,15 @@ static void becomeDC_drsuapi_pull_partition_send(struct libnet_BecomeDC_state *s
struct composite_context *c = s->creq;
struct rpc_request *req;
struct drsuapi_DsGetNCChanges *r;
+ int32_t level;
r = talloc(s, struct drsuapi_DsGetNCChanges);
if (composite_nomem(r, c)) return;
+ r->in.level = &level;
r->in.bind_handle = &drsuapi_h->bind_handle;
if (drsuapi_h->remote_info28.supported_extensions & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8) {
- r->in.level = 8;
+ level = 8;
r->in.req.req8.destination_dsa_guid = partition->destination_dsa_guid;
r->in.req.req8.source_dsa_invocation_id = partition->source_dsa_invocation_id;
r->in.req.req8.naming_context = &partition->nc;
@@ -1640,7 +1642,7 @@ static void becomeDC_drsuapi_pull_partition_send(struct libnet_BecomeDC_state *s
r->in.req.req8.mapping_ctr.num_mappings = 0;
r->in.req.req8.mapping_ctr.mappings = NULL;
} else {
- r->in.level = 5;
+ level = 5;
r->in.req.req5.destination_dsa_guid = partition->destination_dsa_guid;
r->in.req.req5.source_dsa_invocation_id = partition->source_dsa_invocation_id;
r->in.req.req5.naming_context = &partition->nc;
@@ -1679,16 +1681,16 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
return r->out.result;
}
- if (r->out.level == 1) {
+ if (*r->out.level == 1) {
ctr_level = 1;
ctr1 = &r->out.ctr.ctr1;
- } else if (r->out.level == 2) {
+ } else if (*r->out.level == 2) {
ctr_level = 1;
ctr1 = r->out.ctr.ctr2.ctr.mszip1.ctr1;
- } else if (r->out.level == 6) {
+ } else if (*r->out.level == 6) {
ctr_level = 6;
ctr6 = &r->out.ctr.ctr6;
- } else if (r->out.level == 7 &&
+ } else if (*r->out.level == 7 &&
r->out.ctr.ctr7.level == 6 &&
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) {
ctr_level = 6;
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
index 5974506e60..4ce2154edb 100644
--- a/source4/librpc/idl/drsuapi.idl
+++ b/source4/librpc/idl/drsuapi.idl
@@ -623,9 +623,9 @@ interface drsuapi
WERROR drsuapi_DsGetNCChanges(
[in] policy_handle *bind_handle,
- [in,out] int32 level,
- [in,switch_is(level)] drsuapi_DsGetNCChangesRequest req,
- [out,switch_is(level)] drsuapi_DsGetNCChangesCtr ctr
+ [in,out,ref] int32 *level,
+ [in,switch_is(*level)] drsuapi_DsGetNCChangesRequest req,
+ [out,switch_is(*level)] drsuapi_DsGetNCChangesCtr ctr
);
/*****************/
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 619c0c2970..0f849e5586 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -569,9 +569,9 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
array[i].level);
r.in.bind_handle = &priv->bind_handle;
- r.in.level = array[i].level;
+ r.in.level = &array[i].level;
- switch (r.in.level) {
+ switch (*r.in.level) {
case 5:
nc.guid = null_guid;
nc.sid = null_sid;
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index a4167b3dc3..b86b746816 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -412,9 +412,9 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
array[i].level);
r.in.bind_handle = &ctx->new_dc.drsuapi.bind_handle;
- r.in.level = array[i].level;
+ r.in.level = &array[i].level;
- switch (r.in.level) {
+ switch (*r.in.level) {
case 5:
nc.guid = null_guid;
nc.sid = null_sid;
@@ -487,13 +487,13 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
for (y=0; ;y++) {
ZERO_STRUCT(r.out);
- if (r.in.level == 5) {
+ if (*r.in.level == 5) {
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
(long long)r.in.req.req5.highwatermark.tmp_highest_usn,
(long long)r.in.req.req5.highwatermark.highest_usn));
}
- if (r.in.level == 8) {
+ if (*r.in.level == 8) {
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
(long long)r.in.req.req8.highwatermark.tmp_highest_usn,
(long long)r.in.req.req8.highwatermark.highest_usn));
@@ -512,10 +512,10 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
ret = False;
}
- if (ret == True && r.out.level == 1) {
+ if (ret == True && *r.out.level == 1) {
out_level = 1;
ctr1 = &r.out.ctr.ctr1;
- } else if (ret == True && r.out.level == 2) {
+ } else if (ret == True && *r.out.level == 2) {
out_level = 1;
ctr1 = r.out.ctr.ctr2.ctr.mszip1.ctr1;
}
@@ -533,10 +533,10 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
}
}
- if (ret == True && r.out.level == 6) {
+ if (ret == True && *r.out.level == 6) {
out_level = 6;
ctr6 = &r.out.ctr.ctr6;
- } else if (ret == True && r.out.level == 7
+ } else if (ret == True && *r.out.level == 7
&& r.out.ctr.ctr7.level == 6
&& r.out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) {
out_level = 6;