summaryrefslogtreecommitdiff
path: root/plugins/shn
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/shn
parent57de90e3b8958b4d5edf1bd0145f98623768caa9 (diff)
thread-safe config access
Diffstat (limited to 'plugins/shn')
-rw-r--r--plugins/shn/shn.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c
index 87440ee2..4a90583c 100644
--- a/plugins/shn/shn.c
+++ b/plugins/shn/shn.c
@@ -306,8 +306,9 @@ shn_init_decoder (shn_fileinfo_t *info) {
static void
shn_init_config (void) {
shn_cfg.error_output_method = ERROR_OUTPUT_DEVNULL;
- strncpy (shn_cfg.seek_tables_path, deadbeef->conf_get_str ("shn.seektable_path", ""), sizeof (shn_cfg.seek_tables_path));
- strncpy (shn_cfg.relative_seek_tables_path, deadbeef->conf_get_str ("shn.relative_seektable_path", "seektables"), sizeof (shn_cfg.relative_seek_tables_path));
+
+ deadbeef->conf_get_str ("shn.seektable_path", "", shn_cfg.seek_tables_path, sizeof (shn_cfg.seek_tables_path));
+ deadbeef->conf_get_str ("shn.relative_seektable_path", "seektables", shn_cfg.relative_seek_tables_path, sizeof (shn_cfg.relative_seek_tables_path));
shn_cfg.verbose = 0;
shn_cfg.swap_bytes = deadbeef->conf_get_int ("shn.swap_bytes", 0);
}