possible 1.0 blocker; bus timeout

David Zeuthen david at fubar.dk
Fri Nov 3 11:04:47 PST 2006


On Fri, 2006-11-03 at 13:41 -0500, Havoc Pennington wrote:
> David Zeuthen wrote:
> > I'm happy to look investigate the problem and provide a patch... but
> > only if there is some chance a patch will get accepted...
> > 
> 
> I guess my mail you linked to still stands, since I haven't thought 
> about it anymore since then ;-)
> 
> There are some details to work out (such as what happens when you pass a 
> timeout of -1, how integer overflow is handled in some of the 
> timeout-related math in dbus-connection.c, etc.) so you could either 
> post a plan in advance of a patch, or just post a patch to iterate on.

I have no patch yet, but I think the fix that I'm interested in..
includes only removing the six hour timeout in the bus. 

I believe what you want is something like this

   #define DBUS_CONNECTION_TIMEOUT_NONE    -2

and adapting the code to use it. Doing that, it would also be nice to do
 
   #define DBUS_CONNECTION_TIMEOUT_DEFAULT -1

and fixup the code. Would also fixup the docs to replace

 "timeout in milliseconds or -1 for default"

with 

 "timeout in milliseconds, DBUS_CONNECTION_TIMEOUT_DEFAULT (or -1)
  for default or DBUS_CONNECTION_TIMEOUT_NONE (or -2) for no timeout"

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.

     David




More information about the dbus mailing list