Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
* Mesh daemon to watch InterfacesRemoved signals
@ 2019-07-29 12:11 Rafał Gajda
  0 siblings, 0 replies; only message in thread
From: Rafał Gajda @ 2019-07-29 12:11 UTC (permalink / raw)
  To: linux-bluetooth

Hi all,

At the moment after connecting an app, mesh daemon only watches for
that app disconnecting from D-Bus with:
node->disc_watch = l_dbus_add_disconnect_watch(bus,
node->owner, app_disc_cb, node, NULL);

in node.c::get_managed_objects_cb

I can unregister all of the app interfaces (leaving it non functional
but still connected to D-Bus) and mesh daemon will not be aware of
that, still trying to communicate with it.
This is especially problematic if app stops functioning correctly, but
daemon continues to call its methods i.e. when a message is received.

Maybe it would be beneficial for mesh daemon to listen to
InterfacesRemoved signals to determine when apps/nodes disconnect:

signal time=1564398245.483028 sender=:1.6219 -> destination=(null
destination) serial=27 path=/com/silvair/application;
interface=org.freedesktop.DBus.ObjectManager; member=InterfacesRemoved
   object path "/com/silvair/application"
   array [
      string "org.mesh daemon.mesh.Application1"
      string "org.mesh daemon.mesh.ProvisionAgent1"
   ]
signal time=1564398245.483133 sender=:1.6219 -> destination=(null
destination) serial=28 path=/com/silvair/application/element0;
interface=org.freedesktop.DBus.ObjectManager; member=InterfacesRemoved
   object path "/com/silvair/application/element0"
   array [
      string "org.mesh daemon.mesh.Element1"
   ]


This would give applications ability to, for example, have a multiple
nodes registered and remove/change some of them without whole app
restarting.


Best Regards

-- 

Rafał Gajda

Silvair Sp. z o.o.
Jasnogórska 44
31-358 Krakow
POLAND

www.silvair.com

NOTICE TO RECIPIENT

We inform you that Silvair sp. z o.o. with its registered office in
Cracow (31-358), at Jasnogórska Street 44 is the controller of your
personal data. You can find more information about processing personal
data and your rights here.


Informujemy, że administratorem Twoich danych jest Silvair sp. z o.o.
z siedzibą w Krakowie  (31-358), ul. Jasnogórska 44. Więcej informacji
na temat przetwarzania danych osobowych i przysługujących Ci praw
znajdziesz tu


This e-mail message and any documents accompanying it contain
information that belongs to SILVAIR. This e-mail is meant for only the
intended recipient of the transmission and may be a communication
privileged by law, confidential and/or otherwise protected from
disclosure. If you received this e-mail in error and you are not the
intended recipient, any review, use, dissemination, distribution, or
copying of this e-mail or attachment is strictly prohibited. Please
notify us immediately of the error by return e-mail and please delete
this message from your system.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29 12:11 Mesh daemon to watch InterfacesRemoved signals Rafał Gajda

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox