Diff between 7a345ddef3a8494d2cf1d24491dacd0ada513282 and 169aa558fca1079a146d0ad6346ad5c89ab7f93a

Changed Files

File Additions Deletions Status
src/device.c +10 -1 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index 8af77db..7c7196c 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2735,10 +2735,19 @@ void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type)
 		dbus_message_unref(msg);
 	}
 
-	if (state->paired && !state->bonded)
+	if (state->paired && !state->bonded) {
 		btd_adapter_remove_bonding(device->adapter, &device->bdaddr,
 								bdaddr_type);
 
+		state->paired = false;
+
+		/* report change only if both bearers are unpaired */
+		if (!device->bredr_state.paired && !device->le_state.paired)
+			g_dbus_emit_property_changed(dbus_conn, device->path,
+							DEVICE_INTERFACE,
+							"Paired");
+	}
+
 	if (device->bredr_state.connected || device->le_state.connected)
 		return;