diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-03-28 16:31:01 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-04-08 16:35:08 +0200 |
commit | 9e50dda400e0d5109e2901d7dfe8b49cebeffa56 (patch) | |
tree | c0a1eef359130c80da7761cfe3f86af6c1bc5526 /src/mm-device.c | |
parent | 850d302d24a7c0bdf58b1a0a38a2ef04a5bc862d (diff) |
base-modem: set dbus id as soon as object is created
Diffstat (limited to 'src/mm-device.c')
-rw-r--r-- | src/mm-device.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mm-device.c b/src/mm-device.c index 86baf7c7..f3b0726d 100644 --- a/src/mm-device.c +++ b/src/mm-device.c @@ -251,8 +251,7 @@ static void export_modem (MMDevice *self) { GDBusConnection *connection = NULL; - static guint32 id = 0; - gchar *path; + gchar *path; g_assert (MM_IS_BASE_MODEM (self->priv->modem)); g_assert (G_IS_DBUS_OBJECT_MANAGER (self->priv->object_manager)); @@ -275,7 +274,7 @@ export_modem (MMDevice *self) /* No outstanding port tasks, so if the modem is valid we can export it */ - path = g_strdup_printf (MM_DBUS_MODEM_PREFIX "/%d", id++); + path = g_strdup_printf (MM_DBUS_MODEM_PREFIX "/%d", mm_base_modem_get_dbus_id (self->priv->modem)); g_object_get (self->priv->object_manager, "connection", &connection, NULL); |