[pulseaudio-commits] r2479 - /trunk/src/modules/module-device-restore.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed May 21 15:47:08 PDT 2008
Author: lennart
Date: Thu May 22 00:47:07 2008
New Revision: 2479
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2479&root=pulseaudio&view=rev
Log:
move device volume file to state dir
Modified:
trunk/src/modules/module-device-restore.c
Modified: trunk/src/modules/module-device-restore.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-device-restore.c?rev=2479&root=pulseaudio&r1=2478&r2=2479&view=diff
==============================================================================
--- trunk/src/modules/module-device-restore.c (original)
+++ trunk/src/modules/module-device-restore.c Thu May 22 00:47:07 2008
@@ -263,7 +263,7 @@
int pa__init(pa_module*m) {
pa_modargs *ma = NULL;
struct userdata *u;
- char *fname, *runtime_dir;
+ char *fname, *fn;
char hn[256];
pa_sink *sink;
pa_source *source;
@@ -290,11 +290,12 @@
if (!pa_get_host_name(hn, sizeof(hn)))
goto fail;
- if (!(runtime_dir = pa_get_runtime_dir()))
- goto fail;
-
- fname = pa_sprintf_malloc("%s/device-volumes.%s.gdbm", runtime_dir, hn);
- pa_xfree(runtime_dir);
+ fn = pa_sprintf_malloc("device-volumes.%s.gdbm", hn);
+ fname = pa_state_path(fn);
+ pa_xfree(fn);
+
+ if (!fname)
+ goto fail;
if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT, 0600, NULL))) {
pa_log("Failed to open volume database '%s': %s", fname, gdbm_strerror(gdbm_errno));
More information about the pulseaudio-commits
mailing list