implementing IN_PROGRESS

Havoc Pennington hp at redhat.com
Sat Feb 25 19:31:44 PST 2006


On Sun, 2006-02-26 at 02:56 +0100, Thiago Macieira wrote:
> 
> >There are several ways I can think of that a handler would know it's
> >being called the first time or the second time; any thoughts on that?
> 
> I think the most inobtrusive way to do this is to overload 
> dbus_connection_add_filter into dbus_connection_add_filter2 that takes 
> two functions as parameters. The second one would be called when the lock 
> has been released.


Another possible approach is that you could track it via the user_data,
e.g. you'd have a flag in user_data for "I just returned
PARTIALLY_HANDLED" - I don't know what you're using user_data for
already so maybe this is not good, depending.

Havoc




More information about the dbus mailing list