[PATCH] async dcerpc pipe connect code in samba4

Rafal Szczesniak mimir at samba.org
Wed Mar 8 22:32:40 GMT 2006


On Wed, Mar 08, 2006 at 11:37:58AM +0100, Stefan (metze) Metzmacher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Rafal Szczesniak schrieb:
> > Hi all,
> > 
> - - use TALLOC_CTX *mem_ctx, struct dcerpc_pipe_context **p2)
>   in the _recv hook for the second pipe too
> 
> > +struct composite_context* dcerpc_secondary_connection_send(TALLOC_CTX *mem_ctx,
> > +							   struct dcerpc_pipe *p,
> > +							   struct dcerpc_pipe **p2,
> and maybe move **p2 to the _recv function...
> like for the functions which create the first pipe
> 
[...]
> > +	c->status = dcerpc_pipe_open_smb_recv(ctx);
> > +	if (!NT_STATUS_IS_OK(c->status)) {
> > +		composite_error(c, c->status);
> > +
> > +		talloc_free(*s->pipe2);
> 
> is this explicit talloc_free needed here? maybe you can do a talloc_steal after it's allocated
> above...
> (same in some other places below)
> 
[...]
> 
> > +
> > +NTSTATUS dcerpc_secondary_connection_recv(struct composite_context *c)
> maybe add TALLOC_CTX *mem_ctx and struct dcerpc_pipe **p2

This means we have to provide memory context each time when calling
the function (including sync version). It's no longer a function
initialising given pointer, but a function doing it using a given
mem_ctx. It's actually even more consistent (read: better) with the way
of returning initialised pointer we're doing now. I'm just not sure if 
that's what original author meant. That's why I haven't changed it.

Current tests hangs when doing rpc calls on ncacn_np. Any idea why ?


cheers,
-- 
Rafal Szczesniak
Samba Team member  http://www.samba.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20060308/2346f169/attachment.bin


More information about the samba-technical mailing list