summaryrefslogtreecommitdiff
path: root/src/ppp
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-03-13 10:14:06 +0100
committerThomas Haller <thaller@redhat.com>2018-03-13 11:29:18 +0100
commit57ab9fd60fc9ec3ab7bc3fcef40b1f003d614162 (patch)
tree6a1e175ab577236f566de1993a8a20ca87fb31a9 /src/ppp
parent1e535789cfd8dbc94da1e4f6393d27ccc2a209fc (diff)
downloadNetworkManager-57ab9fd60fc9ec3ab7bc3fcef40b1f003d614162.tar.gz
core/dbus: rework creating numbered D-Bus export path by putting counter into class
I dislike the static hash table to cache the integer counter for numbered paths. Let's instead cache the counter at the class instance itself -- since the class contains the information how the export path should be exported. However, we cannot use a plain integer field inside the class structure, because the class is copied between derived classes. For example, NMDeviceEthernet and NMDeviceBridge both get a copy of the NMDeviceClass instance. Hence, the class doesn't contain the counter directly, but a pointer to one counter that can be shared between sibling classes.
Diffstat (limited to 'src/ppp')
-rw-r--r--src/ppp/nm-ppp-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c
index 2bf230a86b..7d1eb4089d 100644
--- a/src/ppp/nm-ppp-manager.c
+++ b/src/ppp/nm-ppp-manager.c
@@ -1419,7 +1419,7 @@ nm_ppp_manager_class_init (NMPPPManagerClass *manager_class)
object_class->get_property = get_property;
object_class->set_property = set_property;
- dbus_object_class->export_path = NM_EXPORT_PATH_NUMBERED (NM_DBUS_PATH"/PPP");
+ dbus_object_class->export_path = NM_DBUS_EXPORT_PATH_NUMBERED (NM_DBUS_PATH"/PPP");
dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_ppp);
obj_properties[PROP_PARENT_IFACE] =