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.
<br><br>But a private connection is dedicated to calling application and should be close by application at the end.<br><br>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><br>-Br<br>Naveen<br><br><div class="gmail_quote">On Jan 8, 2008 3:55 PM, Ge@@ru <<a href="mailto:geaaru@gmail.com">geaaru@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On dbus session (share connection) works fine. Only on system session i<br>have this problem.<br><br>So, why i can't close this shared connection?<br><br>Thanks<br><font color="#888888"><br>Ge@@ru<br></font><div><div>
</div><div class="Wj3C7c"><br>On Tue, 2008-01-08 at 16:01 +0200, Naveen Verma wrote:<br>> Hi,<br>><br>> Probably you are taking a shared connection which you can't close,<br>> thats why this error is coming. What if you could try to take a
<br>> private connection (dbus_bus_get_private()), and<br>> close(dbus_connection_close()) and<br>> unreferenced(dbus_connection_unref()) after use and then call<br>> dbus_shutdown()?<br>><br>> -Br<br>> Naveen
<br>><br>> On Jan 8, 2008 2:51 PM, Ge@@ru <<a href="mailto:geaaru@gmail.com">geaaru@gmail.com</a>> wrote:<br>> Hi at all,<br>> i want use dbus_shutdown function for deallocate internal<br>
> dbus variable<br>> before exit from my application and avoid valgrind warning.<br>> On bus session this works fine but on system bus i have this<br>> abort:<br>> process 26586: dbus_shutdown() called but connections were
<br>> still live.<br>> This probably means the application did not drop all its<br>> references to<br>> bus connections<br>><br>> Why? Have you an idea how can i resolve this problem?
<br>><br>> Thanks in advance.<br>><br>> Ge@@ru<br>><br>> _______________________________________________<br>> dbus mailing list<br>> <a href="mailto:dbus@lists.freedesktop.org">
dbus@lists.freedesktop.org</a><br>> <a href="http://lists.freedesktop.org/mailman/listinfo/dbus" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>><br><br></div></div></blockquote></div>
<br>