proposition of further changes in dcerpc code
Stefan Metzmacher
metze at samba.org
Mon Dec 5 15:44:45 GMT 2005
On Mon, Dec 05, 2005 at 10:47:54AM +0100, Rafal Szczesniak wrote:
Hi Rafal,
I have some comments...
and please do 'make clean test valgrindtest' befor commiting :-)
> +struct pipe_connect {
please rename this to dcerpc_pipe_connect
> + c->status = dcerpc_pipe_open_smb_recv(ctx);
> + if (!composite_is_ok(c)) {
> + DEBUG(0,("Failed to open pipe %s - %s\n", s->io.pipe_name, nt_errstr(c->status)));
> + return;
> + }
this will crash, as the composite_is_ok() calls the callback and that calls the _recv() function
which free's the composite_context, so put the debug before the composite_is_ok()
or remove it completly.
> +
> + c->status = smb_composite_connect_recv(ctx, c);
> + if (!composite_is_ok(c)) {
> + DEBUG(0,("Failed to connect to %s - %s\n", s->io.binding->host, nt_errstr(c->status)));
same as above...
> + if (s->io.binding->flags & DCERPC_SCHANNEL) {
> + struct cli_credentials *anon_creds
> + = cli_credentials_init(tmp_ctx);
if (composite_nomem(anon_creds, c)) return;
> +
> +NTSTATUS dcerpc_pipe_connect_ncacn_np_smb_recv(struct composite_context *c,
> + TALLOC_CTX *mem_ctx)
the mem_ctx isn't used, so remove it here
More information about the samba-technical
mailing list