possible 1.0 blocker; bus timeout

Havoc Pennington hp at redhat.com
Fri Nov 3 11:13:10 PST 2006


Hi,

David Zeuthen wrote:
> I believe what you want is something like this
> 
>    #define DBUS_CONNECTION_TIMEOUT_NONE    -2
> 

Did I really propose that before? It seems a little hacktastic. I would 
suggest the only magic value is -1, which means "some plausible default 
timeout", and if you want infinite you can pass in INT_MAX.

Right now INT_MAX gets clamped to 6 hours, that is what the patch would fix.

This would not break ABI; the docs already suggest INT_MAX for infinite 
and document -1 as "pick a sane default" (25 seconds right now), though 
they might have some note about how INT_MAX currently gets clamped, I 
don't know, if so that docs note would be removed with this patch and 
INT_MAX would just mean INT_MAX.

Then we remove the timeout from the bus daemon entirely and just rely on 
the max number of pending calls.

> One fix for 1.0 probably just includes adding the two defines and
> removing the six-hour timeout in the bus. Then we'd ship with a known
> bug that TIMEOUT_NONE really is 49 days instead of infinite. But we'd
> have all we need to fix this without extending the interface... I dunno.

Is it really hard to fix the integer math not to overflow? (Is that the 
only reason for 49 days instead of INT_MAX?)

Havoc



More information about the dbus mailing list