if i&#39;m sure that my application will be soon died?<br><br>I did not understand this...<br><br>Well anyway if you can close the shared connection which you open with the system bus then you can also shut down. So I think first try to close the connection. You will find the answer :)
<br><br>-Br<br>Naveen<br><br><div class="gmail_quote">On Jan 9, 2008 9:44 AM, Ge@@ru &lt;<a href="mailto:geaaru@gmail.com">geaaru@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>On Tue, 2008-01-08 at 16:37 +0200, Naveen Verma wrote:<br>&gt; As per my understanding, dbus re-use the share connection. So if you<br>&gt; do dbus_bus_get(). Then it checks for any existing free connection
<br>&gt; with the given bus, if it available then it allocate it for<br>&gt; application, if no free connection available then it create a new<br>&gt; connection and keep its record to reuse it. Thats why we can&#39;t close
<br>&gt; the shared connection, if we try to do so , dbus gives a runtime<br>&gt; error.<br>&gt;<br>&gt; But a private connection is dedicated to calling application and<br>&gt; should be close by application at the end.<br>
&gt;<br>&gt; Not sure but in my understanding this rule is followed more strictly<br>&gt; in the case of system bus because the shared connections are system<br>&gt; wide and can be shared between different sessions. While in the case
<br>&gt; of session bus the shared connections are limited to only particular<br>&gt; session.<br>&gt;<br>&gt; -Br<br>&gt; Naveen<br>&gt;<br><br></div>This could be a valid solution for service always active, but for an<br>
application that is connect to &quot;system bus&quot; and that for example do a<br>query for known Service active and exit, then however if i call<br>dbus_shutdown or no, when application die still internal dbus variables
<br>are deallocated, so why not permit to call dbus_shutdown on system bus<br>if i&#39;m sure that my application will be soon died?<br><br>Thank you very very much for your replies!<br><font color="#888888"><br>Ge@@ru<br>
</font><div><div></div><div class="Wj3C7c"><br><br><br><br><br><br>&gt; On Jan 8, 2008 3:55 PM, Ge@@ru &lt;<a href="mailto:geaaru@gmail.com">geaaru@gmail.com</a>&gt; wrote:<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; On dbus session (share connection) works fine. Only on system
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; session i<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; have this problem.<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; So, why i can&#39;t close this shared connection?<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; Thanks<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; Ge@@ru<br>&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; On Tue, 2008-01-08 at 16:01 +0200, Naveen Verma wrote:
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; Hi,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; Probably you are taking a shared connection which you can&#39;t<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; close,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; thats why this error is coming. What if you could try to
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; take a<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; private connection (dbus_bus_get_private()), and<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; close(dbus_connection_close()) and<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; unreferenced(dbus_connection_unref()) after use and then
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; call<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; dbus_shutdown()?<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; -Br<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; Naveen<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; On Jan 8, 2008 2:51 PM, Ge@@ru &lt;<a href="mailto:geaaru@gmail.com">
geaaru@gmail.com</a>&gt; wrote:<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; Hi at all,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i want use dbus_shutdown function for deallocate<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; internal<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; dbus variable<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; before exit from my application and avoid valgrind<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; warning.<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; On bus session this works fine but on system bus i<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; have this<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; abort:
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; process 26586: dbus_shutdown() called but<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; connections were<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; still live.<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; This probably means the application did not drop all
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; its<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; references to<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; bus connections<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; Why? Have you an idea how can i resolve this<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; problem?
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; Thanks in advance.<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; Ge@@ru<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; _______________________________________________
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; dbus mailing list<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://lists.freedesktop.org/mailman/listinfo/dbus" target="_blank">
http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt;<br>&gt;<br>&gt;<br>&gt;<br><br></div></div></blockquote></div><br>