summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-08-03 10:01:03 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2017-08-03 10:04:41 +0200
commitd6b278c236c7f226dd76103b77c9a79696ae5b4f (patch)
treedf35212bbe32461fad5c43b95d61b91eafc59a92
parent26ddd45e4cb71b4ebd26902a792f2671ffc98bd8 (diff)
downloadNetworkManager-bg/ppp-bgo559134.tar.gz
fixup! core: device-factory: implement match_connection()bg/ppp-bgo559134
-rw-r--r--src/devices/bluetooth/nm-bluez-manager.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/devices/bluetooth/nm-bluez-manager.c b/src/devices/bluetooth/nm-bluez-manager.c
index 33bea4e27c..74bf027c72 100644
--- a/src/devices/bluetooth/nm-bluez-manager.c
+++ b/src/devices/bluetooth/nm-bluez-manager.c
@@ -26,6 +26,7 @@
#include <gmodule.h>
#include "devices/nm-device-factory.h"
+#include "devices/nm-device-bridge.h"
#include "nm-setting-bluetooth.h"
#include "settings/nm-settings.h"
#include "nm-bluez4-manager.h"
@@ -417,6 +418,21 @@ create_device (NMDeviceFactory *factory,
return NULL;
}
+static gboolean
+match_connection (NMDeviceFactory *factory,
+ NMConnection *connection)
+{
+ const char *type = nm_connection_get_connection_type (connection);
+
+ nm_assert (nm_streq (type, NM_SETTING_BLUETOOTH_SETTING_NAME));
+
+ if ( nm_bt_vtable_network_server
+ && _nm_connection_get_setting_bluetooth_for_nap (connection))
+ return FALSE; /* handled by the bridge factory */
+
+ return TRUE;
+}
+
/*****************************************************************************/
static void
@@ -461,5 +477,6 @@ nm_bluez_manager_class_init (NMBluezManagerClass *klass)
factory_class->get_supported_types = get_supported_types;
factory_class->create_device = create_device;
+ factory_class->match_connection = match_connection;
factory_class->start = start;
}