[PATCH BlueZ 14/14] Reset SignalLevel to unknown when disconnected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 proximity/monitor.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/proximity/monitor.c b/proximity/monitor.c
index 4b5a4ff..e28a79d 100644
--- a/proximity/monitor.c
+++ b/proximity/monitor.c
@@ -396,6 +396,13 @@ static void attio_disconnected_cb(gpointer user_data)
 	g_attrib_unref(monitor->attrib);
 	monitor->attrib = NULL;
 
+	g_free(monitor->signallevel);
+	monitor->signallevel = g_strdup("unknown");
+
+	emit_property_changed(monitor->conn, path, PROXIMITY_INTERFACE,
+					"SignalLevel", DBUS_TYPE_STRING,
+					&monitor->signallevel);
+
 	device_get_address(device, &dba);
 	btd_adapter_disable_rssi_monitor(adapter, &dba);
 	monitor->rssimon = FALSE;
-- 
1.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux