[PATCH BlueZ 6/6] Return LinkLossAlertLevel if enabled

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

 



GetProperties method of Proximity Monitor should not append the
LinkLossAlertLevel property if the LinkLoss service is not enabled
in the configuration file.
---
 proximity/monitor.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/proximity/monitor.c b/proximity/monitor.c
index 5aa954d..96a2ee1 100644
--- a/proximity/monitor.c
+++ b/proximity/monitor.c
@@ -229,8 +229,9 @@ static DBusMessage *get_properties(DBusConnection *conn,
 			DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
 			DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
 
-	dict_append_entry(&dict, "LinkLossAlertLevel",
-			DBUS_TYPE_STRING, &monitor->linklosslevel);
+	if (monitor->enabled.linkloss)
+		dict_append_entry(&dict, "LinkLossAlertLevel",
+				DBUS_TYPE_STRING, &monitor->linklosslevel);
 
 	dbus_message_iter_close_container(&iter, &dict);
 
-- 
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