if i'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 <<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;">
<div class="Ih2E3d"><br>On Tue, 2008-01-08 at 16:37 +0200, Naveen Verma wrote:<br>> As per my understanding, dbus re-use the share connection. So if you<br>> do dbus_bus_get(). Then it checks for any existing free connection
<br>> with the given bus, if it available then it allocate it for<br>> application, if no free connection available then it create a new<br>> connection and keep its record to reuse it. Thats why we can't close
<br>> the shared connection, if we try to do so , dbus gives a runtime<br>> error.<br>><br>> But a private connection is dedicated to calling application and<br>> should be close by application at the end.<br>
><br>> Not sure but in my understanding this rule is followed more strictly<br>> in the case of system bus because the shared connections are system<br>> wide and can be shared between different sessions. While in the case
<br>> of session bus the shared connections are limited to only particular<br>> session.<br>><br>> -Br<br>> Naveen<br>><br><br></div>This could be a valid solution for service always active, but for an<br>
application that is connect to "system bus" 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'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>> On Jan 8, 2008 3:55 PM, Ge@@ru <<a href="mailto:geaaru@gmail.com">geaaru@gmail.com</a>> wrote:<br>> On dbus session (share connection) works fine. Only on system
<br>> session i<br>> have this problem.<br>><br>> So, why i can't close this shared connection?<br>><br>> Thanks<br>><br>> Ge@@ru<br>><br>><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<br>> close,<br>> > thats why this error is coming. What if you could try to
<br>> 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
<br>> 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<br>> internal<br>> > dbus variable<br>
> > before exit from my application and avoid valgrind<br>> warning.<br>> > On bus session this works fine but on system bus i<br>> have this<br>> > abort:
<br>> > process 26586: dbus_shutdown() called but<br>> connections were<br>> > still live.<br>> > This probably means the application did not drop all
<br>> its<br>> > references to<br>> > bus connections<br>> ><br>> > Why? Have you an idea how can i resolve this<br>> 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>><br>><br><br></div></div></blockquote></div><br>