mirror of
https://github.com/samba-team/samba.git
synced 2025-03-26 18:50:30 +03:00
r19844: Fix warnings and errors in epmapper IDL.
(This used to be commit 0221d5b6c4250a3a2c86c623c534996d7decb1f6)
This commit is contained in:
parent
ef9e094d84
commit
41848fea6f
@ -146,13 +146,13 @@ static void refresh_eps(void)
|
||||
if (!NT_STATUS_IS_OK(status) || r.out.result != 0) {
|
||||
break;
|
||||
}
|
||||
for (i=0;i<r.out.num_ents;i++) {
|
||||
for (i=0;i<*r.out.num_ents;i++) {
|
||||
add_epm_entry(mem_ctx, r.out.entries[i].annotation, &r.out.entries[i].tower->tower);
|
||||
}
|
||||
|
||||
} while (NT_STATUS_IS_OK(status) &&
|
||||
r.out.result == 0 &&
|
||||
r.out.num_ents == r.in.max_ents);
|
||||
*r.out.num_ents == r.in.max_ents);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
gtk_show_ntstatus(mainwin, "Error adding endpoint mapper entry", status);
|
||||
|
@ -14,8 +14,7 @@ http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: bindin
|
||||
endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]",
|
||||
"ncalrpc:[EPMAPPER]"),
|
||||
helpstring("EndPoint Mapper"),
|
||||
pointer_default_top(sptr),
|
||||
pointer_default(sptr)
|
||||
pointer_default(ptr)
|
||||
]
|
||||
interface epmapper
|
||||
{
|
||||
@ -254,8 +253,8 @@ interface epmapper
|
||||
[in] uint32 vers_option,
|
||||
[in,out,ref] policy_handle *entry_handle,
|
||||
[in] uint32 max_ents,
|
||||
[out] uint32 num_ents,
|
||||
[out, length_is(num_ents), size_is(max_ents)] epm_entry_t entries[]
|
||||
[out] uint32 *num_ents,
|
||||
[out, length_is(*num_ents), size_is(max_ents)] epm_entry_t entries[]
|
||||
);
|
||||
|
||||
|
||||
@ -271,8 +270,8 @@ interface epmapper
|
||||
[in] epm_twr_t *map_tower,
|
||||
[in,out,ref] policy_handle *entry_handle,
|
||||
[in] uint32 max_towers,
|
||||
[out] uint32 num_towers,
|
||||
[out, length_is(num_towers), size_is(max_towers)] epm_twr_p_t towers[]
|
||||
[out] uint32 *num_towers,
|
||||
[out, length_is(*num_towers), size_is(max_towers)] epm_twr_p_t towers[]
|
||||
);
|
||||
|
||||
|
||||
|
@ -797,6 +797,8 @@ static void continue_epm_recv_binding(struct composite_context *ctx)
|
||||
c->status = dcerpc_pipe_connect_b_recv(ctx, c, &s->pipe);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
s->pipe->conn->flags |= DCERPC_NDR_REF_ALLOC;
|
||||
|
||||
/* prepare requested binding parameters */
|
||||
s->binding->object = s->table->syntax_id;
|
||||
|
||||
@ -833,7 +835,7 @@ static void continue_epm_map(struct rpc_request *req)
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
/* check the details */
|
||||
if (s->r.out.result != 0 || s->r.out.num_towers != 1) {
|
||||
if (s->r.out.result != 0 || *s->r.out.num_towers != 1) {
|
||||
composite_error(c, NT_STATUS_PORT_UNREACHABLE);
|
||||
return;
|
||||
}
|
||||
|
@ -131,7 +131,8 @@ static error_status_t epm_Lookup(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
||||
}
|
||||
|
||||
*r->out.entry_handle = h->wire_handle;
|
||||
r->out.num_ents = num_ents;
|
||||
r->out.num_ents = talloc(mem_ctx, uint32_t);
|
||||
*r->out.num_ents = num_ents;
|
||||
|
||||
if (num_ents == 0) {
|
||||
r->out.entries = NULL;
|
||||
@ -179,7 +180,8 @@ static error_status_t epm_Map(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
|
||||
count = build_ep_list(mem_ctx, dce_call->conn->dce_ctx->endpoint_list, &eps);
|
||||
|
||||
ZERO_STRUCT(*r->out.entry_handle);
|
||||
r->out.num_towers = 1;
|
||||
r->out.num_towers = talloc(mem_ctx, uint32_t);
|
||||
*r->out.num_towers = 1;
|
||||
r->out.towers = talloc(mem_ctx, struct epm_twr_p_t);
|
||||
if (!r->out.towers) {
|
||||
return EPMAPPER_STATUS_NO_MEMORY;
|
||||
@ -230,7 +232,7 @@ static error_status_t epm_Map(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
|
||||
|
||||
|
||||
failed:
|
||||
r->out.num_towers = 0;
|
||||
*r->out.num_towers = 0;
|
||||
r->out.towers->twr = NULL;
|
||||
|
||||
return EPMAPPER_STATUS_NO_MORE_ENTRIES;
|
||||
|
@ -78,7 +78,7 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
|
||||
status = dcerpc_epm_Map(p, mem_ctx, &r);
|
||||
if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
|
||||
for (i=0;i<r.out.num_towers;i++) {
|
||||
for (i=0;i<*r.out.num_towers;i++) {
|
||||
if (r.out.towers[i].twr) {
|
||||
display_tower(mem_ctx, &r.out.towers[i].twr->tower);
|
||||
}
|
||||
@ -91,7 +91,7 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
|
||||
status = dcerpc_epm_Map(p, mem_ctx, &r);
|
||||
if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
|
||||
for (i=0;i<r.out.num_towers;i++) {
|
||||
for (i=0;i<*r.out.num_towers;i++) {
|
||||
if (r.out.towers[i].twr) {
|
||||
display_tower(mem_ctx, &r.out.towers[i].twr->tower);
|
||||
}
|
||||
@ -104,7 +104,7 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
|
||||
status = dcerpc_epm_Map(p, mem_ctx, &r);
|
||||
if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
|
||||
for (i=0;i<r.out.num_towers;i++) {
|
||||
for (i=0;i<*r.out.num_towers;i++) {
|
||||
if (r.out.towers[i].twr) {
|
||||
display_tower(mem_ctx, &r.out.towers[i].twr->tower);
|
||||
}
|
||||
@ -121,7 +121,7 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
|
||||
status = dcerpc_epm_Map(p, mem_ctx, &r);
|
||||
if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
|
||||
for (i=0;i<r.out.num_towers;i++) {
|
||||
for (i=0;i<*r.out.num_towers;i++) {
|
||||
if (r.out.towers[i].twr) {
|
||||
display_tower(mem_ctx, &r.out.towers[i].twr->tower);
|
||||
}
|
||||
@ -163,9 +163,9 @@ static BOOL test_Lookup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
}
|
||||
|
||||
printf("epm_Lookup returned %d events GUID %s\n",
|
||||
r.out.num_ents, GUID_string(mem_ctx, &handle.uuid));
|
||||
*r.out.num_ents, GUID_string(mem_ctx, &handle.uuid));
|
||||
|
||||
for (i=0;i<r.out.num_ents;i++) {
|
||||
for (i=0;i<*r.out.num_ents;i++) {
|
||||
printf("\nFound '%s'\n", r.out.entries[i].annotation);
|
||||
display_tower(mem_ctx, &r.out.entries[i].tower->tower);
|
||||
if (r.out.entries[i].tower->tower.num_floors == 5) {
|
||||
@ -174,7 +174,7 @@ static BOOL test_Lookup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
}
|
||||
} while (NT_STATUS_IS_OK(status) &&
|
||||
r.out.result == 0 &&
|
||||
r.out.num_ents == r.in.max_ents &&
|
||||
*r.out.num_ents == r.in.max_ents &&
|
||||
!policy_handle_empty(&handle));
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user