Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] audio: Replace g_hash_table_contains() with g_hash_table_lookup()
@ 2013-01-07 12:33 Jaganath Kanakkassery
  2013-01-07 12:33 ` [PATCH 2/2] shared: Fix build break Jaganath Kanakkassery
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jaganath Kanakkassery @ 2013-01-07 12:33 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jaganath Kanakkassery

g_hash_table_contains() is supported only from GLib 2.32. If BlueZ has to
build against GLib 2.28 this patch replaces g_hash_table_contains() to
g_hash_table_lookup()
---
 profiles/audio/player.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/profiles/audio/player.c b/profiles/audio/player.c
index 8748893..4198bdb 100644
--- a/profiles/audio/player.c
+++ b/profiles/audio/player.c
@@ -172,8 +172,13 @@ static gboolean get_status(const GDBusPropertyTable *property,
 static gboolean setting_exists(const GDBusPropertyTable *property, void *data)
 {
 	struct media_player *mp = data;
+	const char *value;
+
+	value = g_hash_table_lookup(mp->settings, property->name);
+	if (value == NULL)
+		return FALSE;
 
-	return g_hash_table_contains(mp->settings, property->name);
+	return TRUE;
 }
 
 static gboolean get_setting(const GDBusPropertyTable *property,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-08  3:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 12:33 [PATCH 1/2] audio: Replace g_hash_table_contains() with g_hash_table_lookup() Jaganath Kanakkassery
2013-01-07 12:33 ` [PATCH 2/2] shared: Fix build break Jaganath Kanakkassery
2013-01-08  3:20   ` Marcel Holtmann
2013-01-07 13:12 ` [PATCH 1/2] audio: Replace g_hash_table_contains() with g_hash_table_lookup() Ludek Finstrle
2013-01-07 13:52   ` Jaganath Kanakkassery
2013-01-07 20:00     ` Luiz Augusto von Dentz
2013-01-08  3:24       ` Marcel Holtmann
2013-01-08  3:22 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox