mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 23:30:13 +01:00
core: use NM_MAIN_DBUS_CONNECTION_GET macro
We will use the D-Bus connection of our NMDBusManager singleton more. Use a macro. - it's shorter to type and it's one distinct word. - the name indicates what this is: the main D-Bus connection singleton. By searching for this name we can find all users that care about using this singleton.
This commit is contained in:
parent
143b6e41af
commit
1e01c5fec9
2 changed files with 2 additions and 2 deletions
|
|
@ -527,7 +527,7 @@ nm_dns_systemd_resolved_init (NMDnsSystemdResolved *self)
|
|||
|
||||
c_list_init (&priv->request_queue_lst_head);
|
||||
|
||||
priv->dbus_connection = nm_g_object_ref (nm_dbus_manager_get_dbus_connection (nm_dbus_manager_get ()));
|
||||
priv->dbus_connection = nm_g_object_ref (NM_MAIN_DBUS_CONNECTION_GET);
|
||||
if (!priv->dbus_connection) {
|
||||
_LOGD ("no D-Bus connection");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -863,7 +863,7 @@ nm_connectivity_check_start (NMConnectivity *self,
|
|||
if (has_systemd_resolved) {
|
||||
GDBusConnection *dbus_connection;
|
||||
|
||||
dbus_connection = nm_dbus_manager_get_dbus_connection (nm_dbus_manager_get ());
|
||||
dbus_connection = NM_MAIN_DBUS_CONNECTION_GET;
|
||||
if (!dbus_connection) {
|
||||
/* we have no D-Bus connection? That might happen in configure and quit mode.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue