summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2012-11-22 15:20:24 +0100
committerTanu Kaskinen <tanuk@iki.fi>2012-11-22 23:43:06 +0200
commit6545cc77f48cb9b5fddfa9b85d75068e9df70df4 (patch)
tree7092013b2525d9f4264f05ee64bfcf0fc5af8ec4
parent55baf5424ee489474c37d6515fb0e7808cad9ae6 (diff)
bluetooth: Ignore Device.Connected
The Device.Connected was only used for tracking whether a device module should be loaded, but that information is already included in the individual profile state properties. The property can therefore be completely ignored without any loss in functionality.
-rw-r--r--src/modules/bluetooth/bluetooth-util.c3
-rw-r--r--src/modules/bluetooth/bluetooth-util.h1
-rw-r--r--src/modules/bluetooth/module-bluetooth-discover.c2
3 files changed, 1 insertions, 5 deletions
diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index 90736e95..84822aaf 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -128,7 +128,6 @@ static pa_bluetooth_device* device_new(pa_bluetooth_discovery *discovery, const
d->transports = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
d->paired = -1;
d->alias = NULL;
- d->device_connected = -1;
PA_LLIST_HEAD_INIT(pa_bluetooth_uuid, d->uuids);
d->address = NULL;
d->class = -1;
@@ -348,8 +347,6 @@ static int parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i) {
if (pa_streq(key, "Paired"))
d->paired = !!value;
- else if (pa_streq(key, "Connected"))
- d->device_connected = !!value;
else if (pa_streq(key, "Trusted"))
d->trusted = !!value;
diff --git a/src/modules/bluetooth/bluetooth-util.h b/src/modules/bluetooth/bluetooth-util.h
index c570685a..1ec9e8c6 100644
--- a/src/modules/bluetooth/bluetooth-util.h
+++ b/src/modules/bluetooth/bluetooth-util.h
@@ -110,7 +110,6 @@ struct pa_bluetooth_device {
pa_hashmap *transports;
int paired;
char *alias;
- int device_connected;
PA_LLIST_HEAD(pa_bluetooth_uuid, uuids);
char *address;
int class;
diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
index 2dc7cf53..aef9492e 100644
--- a/src/modules/bluetooth/module-bluetooth-discover.c
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
@@ -74,7 +74,7 @@ static pa_hook_result_t load_module_for_device(pa_bluetooth_discovery *y, const
mi = pa_hashmap_get(u->hashmap, d->path);
- if (!d->dead && d->device_connected > 0 &&
+ if (!d->dead &&
(d->audio_state >= PA_BT_AUDIO_STATE_CONNECTED ||
d->audio_source_state >= PA_BT_AUDIO_STATE_CONNECTED ||
d->hfgw_state >= PA_BT_AUDIO_STATE_CONNECTED)) {