summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-11-06 22:06:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:24:57 -0500
commit4e61cee33c87d479e1bf0f11ecf9e84299bc7544 (patch)
treeaf1a5cd8dea3446a828b5fac5aaedd4d85d3cfe1
parentcde653b55a8b2be2bd45412b42d1df0eaedaa966 (diff)
downloadsamba-4e61cee33c87d479e1bf0f11ecf9e84299bc7544.tar.gz
samba-4e61cee33c87d479e1bf0f11ecf9e84299bc7544.tar.bz2
samba-4e61cee33c87d479e1bf0f11ecf9e84299bc7544.zip
r19587: Fix indentation and correctly set error string when completing
a composite call - don't leave it unset. rafal (This used to be commit 8bd57beca19bd2c76d58b64ddd12553b0adce595)
-rw-r--r--source4/libnet/libnet_rpc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c
index cedd0d07c0..3c9b7352cc 100644
--- a/source4/libnet/libnet_rpc.c
+++ b/source4/libnet/libnet_rpc.c
@@ -112,7 +112,7 @@ static struct composite_context* libnet_RpcConnectSrv_send(struct libnet_context
/* connect to remote dcerpc pipe */
pipe_connect_req = dcerpc_pipe_connect_b_send(c, b, r->in.dcerpc_iface,
- ctx->cred, c->event_ctx);
+ ctx->cred, c->event_ctx);
if (composite_nomem(pipe_connect_req, c)) return c;
composite_continue(c, pipe_connect_req, continue_pipe_connect, c);
@@ -134,7 +134,6 @@ static void continue_pipe_connect(struct composite_context *ctx)
/* receive result of rpc pipe connection */
c->status = dcerpc_pipe_connect_b_recv(ctx, c, &s->r.out.dcerpc_pipe);
- s->r.out.error_string = NULL;
composite_done(c);
}
@@ -173,8 +172,11 @@ static NTSTATUS libnet_RpcConnectSrv_recv(struct composite_context *c,
} else if (r->in.dcerpc_iface == &dcerpc_table_lsarpc) {
ctx->lsa.pipe = talloc_reference(ctx, r->out.dcerpc_pipe);
}
+
+ r->out.error_string = talloc_strdup(mem_ctx, "Success");
+
} else {
- r->out.error_string = talloc_steal(mem_ctx, s->r.out.error_string);
+ r->out.error_string = talloc_asprintf(mem_ctx, "Error: %s", nt_errstr(status));
}
talloc_free(c);