]>
Commit | Line | Data |
---|---|---|
cf87a08b JR |
1 | --- pulseaudio-0.9.21/src/Makefile.am~ 2010-06-08 17:31:32.581778168 +0200 |
2 | +++ pulseaudio-0.9.21/src/Makefile.am 2010-06-09 00:17:58.023181027 +0200 | |
3 | @@ -83,6 +83,7 @@ | |
4 | -DPA_SYSTEM_STATE_PATH=\"$(PA_SYSTEM_STATE_PATH)\" \ | |
5 | -DAO_REQUIRE_CAS \ | |
6 | -DPULSE_LOCALEDIR=\"$(pulselocaledir)\" \ | |
7 | + -DPA_PA_MACHINE_ID=\"$(PA_DEFAULT_CONFIG_DIR)/machine-id\" \ | |
8 | -DPA_MACHINE_ID=\"$(localstatedir)/lib/dbus/machine-id\" \ | |
9 | -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \ | |
10 | -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" | |
11 | --- pulseaudio-0.9.21/src/pulsecore/core-util.c.orig 2009-11-23 04:57:07.000000000 +0100 | |
12 | +++ pulseaudio-0.9.21/src/pulsecore/core-util.c 2010-06-09 00:20:25.361930253 +0200 | |
13 | @@ -2560,6 +2560,20 @@ | |
14 | /* The returned value is supposed be some kind of ascii identifier | |
15 | * that is unique and stable across reboots. */ | |
16 | ||
17 | + /* First we try locally configured ID */ | |
18 | + | |
19 | + if ((f = fopen(PA_PA_MACHINE_ID, "r"))) { | |
20 | + char ln[34] = "", *r; | |
21 | + | |
22 | + r = fgets(ln, sizeof(ln)-1, f); | |
23 | + fclose(f); | |
24 | + | |
25 | + pa_strip_nl(ln); | |
26 | + | |
27 | + if (r && ln[0]) | |
28 | + return pa_utf8_filter(ln); | |
29 | + } | |
30 | + | |
31 | /* First we try the D-Bus UUID, which is the best option we have, | |
32 | * since it fits perfectly our needs and is not as volatile as the | |
33 | * hostname which might be set from dhcp. */ |