dbus_shutdown call

Naveen Verma ernaveenverma at gmail.com
Tue Jan 8 06:37:35 PST 2008


As per my understanding, dbus re-use the share connection. So if you do
dbus_bus_get(). Then it checks for any existing free connection with the
given bus, if it available then it allocate it for application, if no free
connection available then it create a new connection and keep its record to
reuse it. Thats why we can't close the shared connection, if we try to do so
, dbus gives a runtime error.

But a private connection is dedicated to calling application and should be
close by application at the end.

Not sure but in my understanding this rule is followed more strictly in the
case of system bus because the shared connections are system wide and can be
shared between different sessions. While in the case of session bus the
shared connections are limited to only particular session.

-Br
Naveen

On Jan 8, 2008 3:55 PM, Ge@@ru <geaaru at gmail.com> wrote:

> On dbus session (share connection) works fine. Only on system session i
> have this problem.
>
> So, why i can't close this shared connection?
>
> Thanks
>
> Ge@@ru
>
> On Tue, 2008-01-08 at 16:01 +0200, Naveen Verma wrote:
> > Hi,
> >
> > Probably you are taking a shared connection which you can't close,
> > thats why this error is coming. What if you could try to take a
> > private connection (dbus_bus_get_private()), and
> > close(dbus_connection_close()) and
> > unreferenced(dbus_connection_unref()) after use and then call
> > dbus_shutdown()?
> >
> > -Br
> > Naveen
> >
> > On Jan 8, 2008 2:51 PM, Ge@@ru <geaaru at gmail.com> wrote:
> >         Hi at all,
> >          i want use dbus_shutdown function for deallocate internal
> >         dbus variable
> >         before exit from my application and avoid valgrind warning.
> >         On bus session this works fine but on system bus i have this
> >         abort:
> >         process 26586: dbus_shutdown() called but connections were
> >         still live.
> >         This probably means the application did not drop all its
> >         references to
> >         bus connections
> >
> >         Why? Have you an idea how can i resolve this problem?
> >
> >         Thanks in advance.
> >
> >         Ge@@ru
> >
> >         _______________________________________________
> >         dbus mailing list
> >         dbus at lists.freedesktop.org
> >         http://lists.freedesktop.org/mailman/listinfo/dbus
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080108/d6f306cd/attachment-0001.htm 


More information about the dbus mailing list