]> git.pld-linux.org Git - packages/pulseaudio.git/blob - pulseaudio-pa-machine-id.patch
- updated gettext BR
[packages/pulseaudio.git] / pulseaudio-pa-machine-id.patch
1 --- pulseaudio-4.0/configure.ac.orig    2013-06-08 13:07:47.119786074 +0200
2 +++ pulseaudio-4.0/configure.ac 2013-06-08 13:09:53.796450100 +0200
3 @@ -991,6 +991,8 @@
4  
5  PA_MACHINE_ID="${sysconfdir}/machine-id"
6  AX_DEFINE_DIR(PA_MACHINE_ID, PA_MACHINE_ID, [D-Bus machine-id file])
7 +PA_PA_MACHINE_ID="${sysconfdir}/pulse/machine-id"
8 +AX_DEFINE_DIR(PA_PA_MACHINE_ID, PA_PA_MACHINE_ID, [PA machine-id file])
9  PA_MACHINE_ID_FALLBACK="${localstatedir}/lib/dbus/machine-id"
10  AX_DEFINE_DIR(PA_MACHINE_ID_FALLBACK, PA_MACHINE_ID_FALLBACK,
11               [Fallback machine-id file])
12 --- pulseaudio-3.0/src/pulsecore/core-util.c.orig       2012-12-22 08:18:53.590608852 +0100
13 +++ pulseaudio-3.0/src/pulsecore/core-util.c    2012-12-22 09:05:12.940550922 +0100
14 @@ -2893,6 +2893,20 @@
15      /* The returned value is supposed be some kind of ascii identifier
16       * that is unique and stable across reboots. */
17  
18 +    /* First we try locally configured ID */
19 +
20 +    if ((f = pa_fopen_cloexec(PA_PA_MACHINE_ID, "r"))) {
21 +        char ln[34] = "", *r;
22 +
23 +        r = fgets(ln, sizeof(ln)-1, f);
24 +        fclose(f);
25 +
26 +        pa_strip_nl(ln);
27 +
28 +        if (r && ln[0])
29 +            return pa_utf8_filter(ln);
30 +    }
31 +
32      /* First we try the /etc/machine-id, which is the best option we
33       * have, since it fits perfectly our needs and is not as volatile
34       * as the hostname which might be set from dhcp. */
This page took 0.045288 seconds and 3 git commands to generate.