diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2012-10-05 10:16:58 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-10-05 11:27:45 +0300 |
commit | ed6a8af4a31d00bd8a3b5aeb6f22b929f8637d6c (patch) | |
tree | a5cb07a0a27f3fef3926b2a33b08d6d829eb5aba /profiles/proximity/monitor.c | |
parent | 4c34fcd00be61a1b9a659358eb5f6318f0fe2150 (diff) | |
download | bluez-ed6a8af4a31d00bd8a3b5aeb6f22b929f8637d6c.tar.gz |
device: Convert device_get_address into simple getter
This allow to remove number of local variables used only to get device
address and pass it as pointer later on.
bdaddr_type parameter is also removed as there is device_get_addr_type
already present which can be used to get it if needed.
Diffstat (limited to 'profiles/proximity/monitor.c')
-rw-r--r-- | profiles/proximity/monitor.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/profiles/proximity/monitor.c b/profiles/proximity/monitor.c index 03df0e20d..1a142651e 100644 --- a/profiles/proximity/monitor.c +++ b/profiles/proximity/monitor.c @@ -407,7 +407,6 @@ static DBusMessage *set_link_loss_alert(DBusConnection *conn, DBusMessage *msg, { struct monitor *monitor = data; struct btd_device *device = monitor->device; - bdaddr_t dba; if (!level_is_valid(level)) return btd_error_invalid_args(msg); @@ -418,10 +417,9 @@ static DBusMessage *set_link_loss_alert(DBusConnection *conn, DBusMessage *msg, g_free(monitor->linklosslevel); monitor->linklosslevel = g_strdup(level); - device_get_address(device, &dba, NULL); - write_proximity_config(adapter_get_address(device_get_adapter(device)), - &dba, "LinkLossAlertLevel", level); + device_get_address(device), + "LinkLossAlertLevel", level); if (monitor->attrib) write_alert_level(monitor); @@ -593,14 +591,11 @@ int monitor_register(struct btd_device *device, { const char *path = device_get_path(device); struct monitor *monitor; - bdaddr_t dba; char *level; - device_get_address(device, &dba, NULL); - level = read_proximity_config( adapter_get_address(device_get_adapter(device)), - &dba, "LinkLossAlertLevel"); + device_get_address(device), "LinkLossAlertLevel"); monitor = g_new0(struct monitor, 1); monitor->device = btd_device_ref(device); |