1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

s4:librpc/rpc: avoid some indentation levels in dcerpc_epm_map_binding_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-01-25 10:54:45 +01:00 committed by Günther Deschner
parent 6e813ab897
commit 4cf691ce1f

View File

@ -260,24 +260,34 @@ struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
/* Find one of the default pipes for this interface */
for (i = 0; i < table->endpoints->count; i++) {
status = dcerpc_parse_binding(mem_ctx, table->endpoints->names[i], &default_binding);
if (NT_STATUS_IS_OK(status)) {
if (binding->transport == NCA_UNKNOWN)
binding->transport = default_binding->transport;
if (default_binding->transport == binding->transport &&
default_binding->endpoint) {
binding->endpoint = talloc_strdup(binding, default_binding->endpoint);
if (composite_nomem(binding->endpoint, c)) return c;
talloc_free(default_binding);
composite_done(c);
return c;
} else {
talloc_free(default_binding);
}
status = dcerpc_parse_binding(s,
table->endpoints->names[i],
&default_binding);
if (!NT_STATUS_IS_OK(status)) {
continue;
}
if (binding->transport == NCA_UNKNOWN) {
binding->transport = default_binding->transport;
}
if (default_binding->transport != binding->transport) {
TALLOC_FREE(default_binding);
continue;
}
if (default_binding->endpoint == NULL) {
TALLOC_FREE(default_binding);
continue;
}
binding->endpoint = talloc_strdup(binding, default_binding->endpoint);
if (composite_nomem(binding->endpoint, c)) return c;
TALLOC_FREE(default_binding);
composite_done(c);
return c;
}
}