mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pulse-server: create pid file only once
Only try to create the pid file once, not for every socket we listen to.
This commit is contained in:
parent
4292e8fe7e
commit
47bf30d734
1 changed files with 5 additions and 4 deletions
|
|
@ -6273,9 +6273,6 @@ static struct server *create_server(struct impl *impl, char *address)
|
|||
pw_log_error(NAME" %p: can't create server source: %m", impl);
|
||||
goto error_close;
|
||||
}
|
||||
if ((res = create_pid_file()) < 0) {
|
||||
goto error_close;
|
||||
}
|
||||
return server;
|
||||
|
||||
error_close:
|
||||
|
|
@ -6426,6 +6423,7 @@ struct pw_protocol_pulse *pw_protocol_pulse_new(struct pw_context *context,
|
|||
const char *str;
|
||||
struct spa_json it[2];
|
||||
char value[512];
|
||||
int res;
|
||||
|
||||
impl = calloc(1, sizeof(struct impl) + user_data_size);
|
||||
if (impl == NULL)
|
||||
|
|
@ -6480,7 +6478,10 @@ struct pw_protocol_pulse *pw_protocol_pulse_new(struct pw_context *context,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((res = create_pid_file()) < 0) {
|
||||
pw_log_warn(NAME" %p: can't create pid file: %s",
|
||||
impl, spa_strerror(res));
|
||||
}
|
||||
impl->dbus_name = dbus_request_name(context, "org.pulseaudio.Server");
|
||||
|
||||
return (struct pw_protocol_pulse*)impl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue