summaryrefslogtreecommitdiff
path: root/plugins/notify
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-03-31 22:06:22 +0200
committerGravatar waker <wakeroid@gmail.com>2011-03-31 22:06:22 +0200
commit5c2f94c8bfa7b98b3c832d0ce11c6ecdbd474029 (patch)
treeeb92ff856f530485809ee0e2e0710f56f8d0155b /plugins/notify
parent57de90e3b8958b4d5edf1bd0145f98623768caa9 (diff)
thread-safe config access
Diffstat (limited to 'plugins/notify')
-rw-r--r--plugins/notify/notify.c6
1 files changed, 4 insertions, 2 deletions
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];