diff options
author | Thomas Haller <thaller@redhat.com> | 2017-06-03 14:06:25 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-06-03 14:31:28 +0200 |
commit | b161aa884e883f4eeeae45139e733bd3071f87ad (patch) | |
tree | 2249ab1c6c4e6ed2db595ad4b4d1ff65e589872e | |
parent | 32c3c0b13bfce024c30eaf5a4f433fec0b1efa42 (diff) | |
download | NetworkManager-th/bluetooth-nap-bgo783326.tar.gz |
bluetooth: assert against registering same device multiple timesth/bluetooth-nap-bgo783326
-rw-r--r-- | src/devices/bluetooth/nm-bluez5-manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/devices/bluetooth/nm-bluez5-manager.c b/src/devices/bluetooth/nm-bluez5-manager.c index a203d6229d..af2ff0cdf5 100644 --- a/src/devices/bluetooth/nm-bluez5-manager.c +++ b/src/devices/bluetooth/nm-bluez5-manager.c @@ -182,6 +182,9 @@ network_server_register_bridge (const NMBtVTableNetworkServer *vtable, NMBluez5ManagerPrivate *priv = NM_BLUEZ5_MANAGER_GET_PRIVATE (self); NetworkServer *network_server = _find_network_server_for_addr (self, addr); + nm_assert (NM_IS_DEVICE (device)); + nm_assert (!_find_network_server (self, NULL, device)); + if (!network_server) { /* The device checked that a network server is available, before * starting the activation, but for some reason it no longer is. |