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/notify/notify.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/notify') diff --git a/plugins/notify/notify.c b/plugins/notify/notify.c index 6bd42ab8..84669594 100644 --- a/plugins/notify/notify.c +++ b/plugins/notify/notify.c @@ -184,8 +184,10 @@ cover_avail_callback (const char *fname, const char *artist, const char *album, static void show_notification (DB_playItem_t *track) { char title[1024]; char content[1024]; - deadbeef->pl_format_title (track, -1, title, sizeof (title), -1, deadbeef->conf_get_str ("notify.format", NOTIFY_DEFAULT_TITLE)); - deadbeef->pl_format_title (track, -1, content, sizeof (content), -1, deadbeef->conf_get_str ("notify.format_content", NOTIFY_DEFAULT_CONTENT)); + deadbeef->conf_lock (); + deadbeef->pl_format_title (track, -1, title, sizeof (title), -1, deadbeef->conf_get_str_fast ("notify.format", NOTIFY_DEFAULT_TITLE)); + deadbeef->pl_format_title (track, -1, content, sizeof (content), -1, deadbeef->conf_get_str_fast ("notify.format_content", NOTIFY_DEFAULT_CONTENT)); + deadbeef->conf_unlock (); // escape & // char esc_title[1024]; -- cgit v1.2.3