From 5c2f94c8bfa7b98b3c832d0ce11c6ecdbd474029 Mon Sep 17 00:00:00 2001 From: waker Date: Thu, 31 Mar 2011 22:06:22 +0200 Subject: thread-safe config access --- plugins/cdda/cdda.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/cdda') diff --git a/plugins/cdda/cdda.c b/plugins/cdda/cdda.c index 55352e97..b49c0cea 100644 --- a/plugins/cdda/cdda.c +++ b/plugins/cdda/cdda.c @@ -243,7 +243,8 @@ resolve_disc (CdIo_t *cdio) conn = cddb_new(); - cddb_set_server_name (conn, deadbeef->conf_get_str ("cdda.freedb.host", DEFAULT_SERVER)); + deadbeef->conf_lock (); + cddb_set_server_name (conn, deadbeef->conf_get_str_fast ("cdda.freedb.host", DEFAULT_SERVER)); cddb_set_server_port (conn, deadbeef->conf_get_int ("cdda.freedb.port", DEFAULT_PORT)); if (!deadbeef->conf_get_int ("cdda.protocol", DEFAULT_PROTOCOL)) @@ -252,9 +253,10 @@ resolve_disc (CdIo_t *cdio) if (deadbeef->conf_get_int ("network.proxy", 0)) { cddb_set_server_port(conn, deadbeef->conf_get_int ("network.proxy.port", 8080)); - cddb_set_server_name(conn, deadbeef->conf_get_str ("network.proxy.address", "")); + cddb_set_server_name(conn, deadbeef->conf_get_str_fast ("network.proxy.address", "")); } } + deadbeef->conf_unlock (); int matches = cddb_query (conn, disc); if (matches == -1) -- cgit v1.2.3