mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 22:20:19 +01:00
bluetooth: Don't call into bluez5 DUN code when it's not enabled
It is conditionally compiled depending on presence of bluez-libs.
Results in undefined symbols:
NetworkManager[19346]: <warn> (/libnm-device-plugin-bluetooth.so): failed to
load plugin: /usr/lib64/NetworkManager/libnm-device-plugin-bluetooth.so:
undefined symbol: nm_bluez5_dun_cleanup
This commit is contained in:
parent
66b05c94c0
commit
751b52e50b
1 changed files with 12 additions and 0 deletions
|
|
@ -427,7 +427,11 @@ nm_bluez_device_disconnect (NMBluezDevice *self)
|
|||
args = g_variant_new ("(s)", priv->b4_iface),
|
||||
dbus_iface = BLUEZ4_SERIAL_INTERFACE;
|
||||
} else if (priv->bluez_version == 5) {
|
||||
#if WITH_BLUEZ5_DUN
|
||||
nm_bluez5_dun_cleanup (priv->b5_dun_context);
|
||||
#else
|
||||
g_assert_not_reached ();
|
||||
#endif
|
||||
priv->connected = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -541,9 +545,13 @@ nm_bluez_device_connect_async (NMBluezDevice *self,
|
|||
if (priv->bluez_version == 4)
|
||||
dbus_iface = BLUEZ4_SERIAL_INTERFACE;
|
||||
else if (priv->bluez_version == 5) {
|
||||
#if WITH_BLUEZ5_DUN
|
||||
if (priv->b5_dun_context == NULL)
|
||||
priv->b5_dun_context = nm_bluez5_dun_new (priv->adapter_address, priv->address);
|
||||
nm_bluez5_dun_connect (priv->b5_dun_context, bluez5_dun_connect_cb, simple);
|
||||
#else
|
||||
g_assert_not_reached ();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
} else
|
||||
|
|
@ -1090,7 +1098,11 @@ dispose (GObject *object)
|
|||
}
|
||||
|
||||
if (priv->b5_dun_context) {
|
||||
#if WITH_BLUEZ5_DUN
|
||||
nm_bluez5_dun_free (priv->b5_dun_context);
|
||||
#else
|
||||
g_assert_not_reached ();
|
||||
#endif
|
||||
priv->b5_dun_context = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue