From: Pierre-Luc B. <pie...@sa...> - 2010-12-22 15:28:52
|
We need to keep track of how many clients are currently connected to our server application via DBus, and exit when no one is using it. Using NameOwnerChanged from org.freedesktop.DBus on the session bus would allow to detect for client that disappeared because of a crash, and release the allocation made for it in the server. To implement this logic, the unique name given to the client should be known. The only way I see this can be done is through Message::sender() (in the server). However, the Message object does not seem to be easily available from the method being called in the bound object (in the server). I could maybe hack my way into the glue file ... but then any change in it would have to be maintained manually. Has anybody dealt with that issue ? Thank you |