jeanparpaillon / erlang-dbus

Erlang DBUS implementation (forked from unmaintained erlang-dbus)
Apache License 2.0
51 stars 22 forks source link

dbus_service_reg is simply wrong #31

Closed tonywallace64 closed 6 years ago

tonywallace64 commented 6 years ago

If we look at the code for dbus_service_reg:handle_call({export_service,ServiceName}...) we see a call to dbus_bus_reg:export_service(undefined, ServiceName), which then exports to each bus.

The reason we have separate busses in dbus is separation of concerns, to separate system messages from session messages for example. Exporting a service to every bus is simply the wrong thing to do.

A grep of the source shows that dbus_bus_reg:export_service and dbus_bus_reg:unexport service are only called from dbus_service_reg.

I suggest therefore that dbus_service_reg be removed from the repository, its associated start command removed from dbus_sup and export and unexport be removed from dbus_bus_reg.

Tony

tonywallace64 commented 6 years ago

I am not sure I have got it right. so will close it for now.