mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
protocol-native,proplist-util: port to pa_get_{user|host}_name_malloc()
This commit is contained in:
parent
a8f0d7ec1e
commit
ad5a1f312a
2 changed files with 19 additions and 13 deletions
|
|
@ -168,20 +168,20 @@ void pa_init_proplist(pa_proplist *p) {
|
|||
}
|
||||
|
||||
if (!pa_proplist_contains(p, PA_PROP_APPLICATION_PROCESS_USER)) {
|
||||
char t[64];
|
||||
if (pa_get_user_name(t, sizeof(t))) {
|
||||
char *c = pa_utf8_filter(t);
|
||||
pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_USER, c);
|
||||
pa_xfree(c);
|
||||
char *u;
|
||||
|
||||
if ((u = pa_get_user_name_malloc())) {
|
||||
pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_USER, u);
|
||||
pa_xfree(u);
|
||||
}
|
||||
}
|
||||
|
||||
if (!pa_proplist_contains(p, PA_PROP_APPLICATION_PROCESS_HOST)) {
|
||||
char t[64];
|
||||
if (pa_get_host_name(t, sizeof(t))) {
|
||||
char *c = pa_utf8_filter(t);
|
||||
pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_HOST, c);
|
||||
pa_xfree(c);
|
||||
char *h;
|
||||
|
||||
if ((h = pa_get_host_name_malloc())) {
|
||||
pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_HOST, h);
|
||||
pa_xfree(h);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue