DBusConnection -> DBusGConnection woes

Rob Taylor rob.taylor at codethink.co.uk
Thu Mar 29 01:49:54 PDT 2007


Ross Burton wrote:
> On Thu, 2007-03-29 at 00:53 +0100, Rob Taylor wrote:
>> If you can fill in the sanity check, it looks fine to me :)
> 
> The connection slot variable is static to DBusGMain, so I renamed it to
> _connection_slot and make it public (but ld will keep it private due to
> the leading _).
> 
> I then declared it extern in dbus-glib.c (urgh, any better suggestions
> for a location?) 

Not really, maybe create a dbus-gmain.h, but that seems slight overkill
for just one extern.  However, I'd suggest calling it
_dbus_gmain_connection_slot so its more obvious where it comes from.

> and sanity checked it.  I also added a NULL check on
> dbus_g_connection_get_connection() and wrote a test case.
> 
> Attached is the patch.

Apart from the above suggestion, patch looks good to me. Nice work on
adding a test case as well, beers shall fly your way next we meet...

Thanks,
Rob Taylor


More information about the dbus mailing list