gdbus: Remove proxies when client disconnects
authorHenrique Dante de Almeida <hdante@profusion.mobi>
Mon, 27 May 2013 17:15:34 +0000 (14:15 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 19 Jun 2013 06:11:35 +0000 (08:11 +0200)
commit2e2b588a46127a792f779798fac4ae2f2baf2c54
treee1026ef59ab1a87fdf63fc0e33991cc746595568
parent53a0fa8c7cd5c108613a09004c906c2cc7420b86
gdbus: Remove proxies when client disconnects

Remove proxies and generate proxy_removed callbacks even when there are
no corresponding InterfaceRemoved signals.

This patch fixes having zombie gdbus proxy object when a server
disconnects without sending InterfaceRemoved signals. These objects
may interact with new server instances, for example, making
InterfaceAdded signals of new objects with the same name be filtered
out as duplicated, or staying allocated, but unused, if the new server
doesn't reuse the object paths. Note that as a side-effect, the
lifetime of a gdbus proxy becomes stricter: it lives at most for the
duration of a single connection to a single instance of a server
process.
gdbus/client.c