mirror of git://git.sysmocom.de/ofono
gdbus: Don't register DBus.Properties with no properties
Delay registering DBus.Properties interface until the moment there are properties on that path. This is needed for objects that currently don't expose any property to not export the interface.
This commit is contained in:
parent
83c275745f
commit
959d23833f
|
@ -1213,9 +1213,6 @@ static struct generic_data *object_path_ref(DBusConnection *connection,
|
|||
manager_methods, manager_signals,
|
||||
NULL, data, NULL);
|
||||
|
||||
add_interface(data, DBUS_INTERFACE_PROPERTIES, properties_methods,
|
||||
properties_signals, NULL, data, NULL);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -1336,6 +1333,12 @@ gboolean g_dbus_register_interface(DBusConnection *connection,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (properties != NULL && !find_interface(data->interfaces,
|
||||
DBUS_INTERFACE_PROPERTIES))
|
||||
add_interface(data, DBUS_INTERFACE_PROPERTIES,
|
||||
properties_methods, properties_signals, NULL,
|
||||
data, NULL);
|
||||
|
||||
add_interface(data, name, methods, signals, properties, user_data,
|
||||
destroy);
|
||||
|
||||
|
|
Loading…
Reference in New Issue