mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00:00
remote: slightly improve debugging of socket selection
The current debug message reports the "mode" after selection has completed, however, the "mode" value can be changed by the selection logic. It is thus beneficial to report most values upfront, and only report newly changed values at the end. Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
ecfc4094d8
commit
9a71e969b5
@ -145,6 +145,11 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
|
|||||||
g_autofree char *direct_sock_name = NULL;
|
g_autofree char *direct_sock_name = NULL;
|
||||||
g_autofree char *legacy_sock_name = NULL;
|
g_autofree char *legacy_sock_name = NULL;
|
||||||
|
|
||||||
|
VIR_DEBUG("Choosing remote socket for transport=%s mode=%s driver=%s ro=%d session=%d",
|
||||||
|
remoteDriverTransportTypeToString(transport),
|
||||||
|
remoteDriverModeTypeToString(mode),
|
||||||
|
driver, ro, session);
|
||||||
|
|
||||||
if (driver)
|
if (driver)
|
||||||
direct_daemon = g_strdup_printf("virt%sd", driver);
|
direct_daemon = g_strdup_printf("virt%sd", driver);
|
||||||
|
|
||||||
@ -208,12 +213,9 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_DEBUG("Chosen UNIX sockname=%s daemon=%s "
|
VIR_DEBUG("Chosen UNIX sockname=%s daemon=%s with mode=%s",
|
||||||
"for mode=%s transport=%s ro=%d session=%d",
|
|
||||||
sock_name, NULLSTR(*daemon),
|
sock_name, NULLSTR(*daemon),
|
||||||
remoteDriverModeTypeToString(mode),
|
remoteDriverModeTypeToString(mode));
|
||||||
remoteDriverTransportTypeToString(transport),
|
|
||||||
ro, session);
|
|
||||||
return sock_name;
|
return sock_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user