svn commit: samba r12087 - in branches/SAMBA_4_0/source/librpc/rpc: .

Rafal Szczesniak mimir at
Tue Dec 6 12:12:03 GMT 2005

On Tue, Dec 06, 2005 at 10:36:43PM +1100, tridge at wrote:
> Metze,
>  > this should be composite_error(), as the trigger versions are only used
>  > in the _send() function that creates the composite_context, and where a async callback
>  > isn't set by the caller.
> I've been trying to think of a way to automate this, as its a trap
> that I think lots of people will fall info. It would be nice if
> composite_error() and other helper functions just "did the right
> thing" in both situations, without the caller having to care about
> whether its the initial send or not.

Yes, that would be easier :)

> A simple approach would be to add an internal flag (perhaps
> 'called_wait') to the composite_context structure, which is set when
> composite_wait() is called.  Then composite_error() would call
> composite_trigger_error() if there is no ctx->async.fn callback set,
> and composite_wait() has not been called. Does that cover all the
> situations?
> The idea is that if a callback has been set, then we don't need the
> timer based trigger. We also don't need the timer based trigger if the
> caller is using the composite_wait() method to wait for completion (as
> is used by the sync calls). In all other situations we do need the
> trigger as the caller needs an opportunity to setup the callback.

Sounds good to me.

Rafal Szczesniak
Samba Team member

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the samba-technical mailing list