summaryrefslogtreecommitdiff
path: root/src/devices/bluetooth
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2014-11-12 15:24:06 +0100
committerLubomir Rintel <lkundrak@v3.sk>2014-11-12 16:15:20 +0100
commit751b52e50be049b53a0b998638a22d4e28a59135 (patch)
tree885e41a34f858ee9d09b4bae3110ec544745a5fd /src/devices/bluetooth
parent66b05c94c0f5f6dcf72c3256ff7f4f7d7845eb68 (diff)
downloadNetworkManager-751b52e50be049b53a0b998638a22d4e28a59135.tar.gz
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
Diffstat (limited to 'src/devices/bluetooth')
-rw-r--r--src/devices/bluetooth/nm-bluez-device.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/devices/bluetooth/nm-bluez-device.c b/src/devices/bluetooth/nm-bluez-device.c
index 40fb31819b..a941685b97 100644
--- a/src/devices/bluetooth/nm-bluez-device.c
+++ b/src/devices/bluetooth/nm-bluez-device.c
@@ -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;
}