Creating a dbus connection

Naveen Verma ernaveenverma at gmail.com
Thu Jul 5 08:43:06 PDT 2007


Hi,

On 7/5/07, P. Durante <shackan at gmail.com> wrote:
>
> On 7/5/07, Naveen Verma <ernaveenverma at gmail.com> wrote:
> >
> > As per my previous understanding, there is a function in dbus C apis,
> > dbus_bus_register() to register a connection. To test it I have added a
> > public function in DBus::Connection class as:
> > bool register_connection() {
> >    return dbus_bus_register(_pvt->conn);
> > }
> >
> >
> > And in my program I am doing like:
> > DBus::Connection *pconn = DBus::Connection(bus_path);
> > pconn->register_connection();
> >
> > After this it is working ok.
> >
> > So I have a question, is there any other way already exist to register
> the
> > connection, or such function is missing and we need to add one as I did
> > above?
>
> Yes, it's a bug, as per the doc:
>
> "If you open a bus connection with dbus_connection_open() or
> dbus_connection_open_private() you will have to dbus_bus_register()
> yourself, or make the appropriate registration method calls yourself."
>
> the constructor should call it and it doesn't, this hasn't come up
> earlier because only the 'default' buses were being used.
>
> > Btv,  is there any api documentation for dbus c++ bindings?
> >


Is it ok If I fix this bug and send a patch for it?


I'm afraid that's still on TODO.
>
> thanks for your investigation,
> Paolo



-Br
Naveen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20070705/def58560/attachment.htm 


More information about the dbus mailing list