]> git.pld-linux.org Git - packages/pulseaudio.git/commitdiff
- allow setting machine-id for pulseaudio independent of DBUS UUID or hostname
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 8 Jun 2010 23:10:32 +0000 (23:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pulseaudio-pa-machine-id.patch -> 1.1

pulseaudio-pa-machine-id.patch [new file with mode: 0644]

diff --git a/pulseaudio-pa-machine-id.patch b/pulseaudio-pa-machine-id.patch
new file mode 100644 (file)
index 0000000..3e4fc6b
--- /dev/null
@@ -0,0 +1,33 @@
+--- pulseaudio-0.9.21/src/Makefile.am~ 2010-06-08 17:31:32.581778168 +0200
++++ pulseaudio-0.9.21/src/Makefile.am  2010-06-09 00:17:58.023181027 +0200
+@@ -83,6 +83,7 @@
+       -DPA_SYSTEM_STATE_PATH=\"$(PA_SYSTEM_STATE_PATH)\" \
+       -DAO_REQUIRE_CAS \
+       -DPULSE_LOCALEDIR=\"$(pulselocaledir)\" \
++      -DPA_PA_MACHINE_ID=\"$(PA_DEFAULT_CONFIG_DIR)/machine-id\" \
+       -DPA_MACHINE_ID=\"$(localstatedir)/lib/dbus/machine-id\" \
+         -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
+         -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
+--- pulseaudio-0.9.21/src/pulsecore/core-util.c.orig   2009-11-23 04:57:07.000000000 +0100
++++ pulseaudio-0.9.21/src/pulsecore/core-util.c        2010-06-09 00:20:25.361930253 +0200
+@@ -2560,6 +2560,20 @@
+     /* The returned value is supposed be some kind of ascii identifier
+      * that is unique and stable across reboots. */
++    /* First we try locally configured ID */
++
++    if ((f = fopen(PA_PA_MACHINE_ID, "r"))) {
++        char ln[34] = "", *r;
++
++        r = fgets(ln, sizeof(ln)-1, f);
++        fclose(f);
++
++        pa_strip_nl(ln);
++
++        if (r && ln[0])
++            return pa_utf8_filter(ln);
++    }
++
+     /* First we try the D-Bus UUID, which is the best option we have,
+      * since it fits perfectly our needs and is not as volatile as the
+      * hostname which might be set from dhcp. */
This page took 0.14871 seconds and 4 git commands to generate.