summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikel Astiz <mikel.astiz@bmw-carit.de>2012-11-22 15:20:25 +0100
committerTanu Kaskinen <tanuk@iki.fi>2012-11-22 23:51:17 +0200
commit59c8476d64677c852719d27e28251d325081c59b (patch)
treeb40328407788ab4faad3b888c684846603bcfc2b
parent6545cc77f48cb9b5fddfa9b85d75068e9df70df4 (diff)
bluetooth: Rename former device_is_audio()
Use a more accurate name for the function since it doesn't just check if it is an audio device (which can be detected quite early), but it also checks if the most relevant properties (device info, etc.) have been received. Besides, add the const qualifier to the pointer since it's not going to be modified.
-rw-r--r--src/modules/bluetooth/bluetooth-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index 84822aafe..565bfce52 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -187,7 +187,7 @@ static void device_free(pa_bluetooth_device *d) {
pa_xfree(d);
}
-static pa_bool_t device_is_audio(pa_bluetooth_device *d) {
+static pa_bool_t device_is_audio_ready(const pa_bluetooth_device *d) {
pa_assert(d);
return
@@ -467,7 +467,7 @@ static int parse_audio_property(pa_bluetooth_discovery *u, int *state, DBusMessa
static void run_callback(pa_bluetooth_device *d, pa_bool_t dead) {
pa_assert(d);
- if (!device_is_audio(d))
+ if (!device_is_audio_ready(d))
return;
d->dead = dead;
@@ -949,7 +949,7 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discover
while ((d = pa_hashmap_iterate(y->devices, &state, NULL)))
if (pa_streq(d->address, address))
- return device_is_audio(d) ? d : NULL;
+ return device_is_audio_ready(d) ? d : NULL;
return NULL;
}
@@ -965,7 +965,7 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *
pa_bluetooth_discovery_sync(y);
if ((d = pa_hashmap_get(y->devices, path)))
- if (device_is_audio(d))
+ if (device_is_audio_ready(d))
return d;
return NULL;