summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-12-17 20:22:42 +0100
committerLennart Poettering <lennart@poettering.net>2009-01-12 20:23:39 +0100
commit6f4d8bc2b44007867b8fb345eaf5dbd6ba36ab6d (patch)
treecd5feaa0148026dd244793c0c91d4f516e7cdfac /src/modules
parenta66d2ed7d19a6ad8ba12e3a74df4b765937e9445 (diff)
Pass GDBM_NOLOCK to gdbm
gdbm still uses BSD lockf for locking which is incompatible with NFS. Since we don't need the locking here since the db files in question should never be accessed by more than one process since they are per-home-dir and per-machine we can disable locking without any ill results. This should fix rhbz #471279.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/module-device-restore.c2
-rw-r--r--src/modules/module-stream-restore.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c
index 86a78810..c0cb0dc5 100644
--- a/src/modules/module-device-restore.c
+++ b/src/modules/module-device-restore.c
@@ -332,7 +332,7 @@ int pa__init(pa_module*m) {
if (!fname)
goto fail;
- if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT, 0600, NULL))) {
+ if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT|GDBM_NOLOCK, 0600, NULL))) {
pa_log("Failed to open volume database '%s': %s", fname, gdbm_strerror(gdbm_errno));
pa_xfree(fname);
goto fail;
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index fe79291e..c983f0b7 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -741,7 +741,7 @@ int pa__init(pa_module*m) {
if (!fname)
goto fail;
- if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT, 0600, NULL))) {
+ if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT|GDBM_NOLOCK, 0600, NULL))) {
pa_log("Failed to open volume database '%s': %s", fname, gdbm_strerror(gdbm_errno));
pa_xfree(fname);
goto fail;