On 7/11/19 6:05 PM, Daniel P. Berrangé wrote:
The ssh, libssh, libssh2 & unix transports all need to use a UNIX socket
path, and duplicate some of the same logic for error checking. Pull this
out into a separate method to increase code sharing.
Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
src/remote/remote_driver.c | 111 ++++++++++++-------------------------
1 file changed, 36 insertions(+), 75 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 87c184720c..c6905dffff 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -739,34 +739,35 @@ remoteConnectSupportsFeatureUnlocked(virConnectPtr conn,
}
-#ifndef WIN32
-static char *remoteGetUNIXSocketNonRoot(void)
+static char *
+remoteGetUNIXSocket(remoteDriverTransport transport,
+ unsigned int flags)
{
char *sockname = NULL;
- char *userdir = virGetUserRuntimeDirectory();
-
- if (!userdir)
- return NULL;
+ VIR_AUTOFREE(char *userdir);
Ouch, how does this even compile?
VIR_AUTOFREE(char *) userdir = NULL;
Michal
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list