mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
remote: don't populate daemon path if autostart is not required
When deciding what socket to connect to, we build the daemon path that we need to autostart. This path only needs to be populated if we actually intend to use autostart. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
fcdcf8f70c
commit
46980c29ef
@ -232,12 +232,16 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!(*daemon_path = virFileFindResourceFull(daemon_name,
|
||||
NULL, NULL,
|
||||
abs_top_builddir "/src",
|
||||
SBINDIR,
|
||||
env_name)))
|
||||
return NULL;
|
||||
if (flags & REMOTE_DRIVER_OPEN_AUTOSTART) {
|
||||
if (!(*daemon_path = virFileFindResourceFull(daemon_name,
|
||||
NULL, NULL,
|
||||
abs_top_builddir "/src",
|
||||
SBINDIR,
|
||||
env_name)))
|
||||
return NULL;
|
||||
} else {
|
||||
*daemon_path = NULL;
|
||||
}
|
||||
|
||||
VIR_DEBUG("Chosen UNIX sockname=%s daemon_path=%s with mode=%s",
|
||||
sock_name, NULLSTR(*daemon_path),
|
||||
|
Loading…
x
Reference in New Issue
Block a user