Return LinkLossAlertLevel if enabled

GetProperties method of Proximity Monitor should not append the
LinkLossAlertLevel property if the LinkLoss service is not enabled
in the configuration file.
This commit is contained in:
Claudio Takahasi 2011-07-28 11:43:43 -03:00 committed by Johan Hedberg
parent 9c24b591d1
commit d955e9b1d9

View File

@ -230,8 +230,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);