From a489ec13bbbad8743143ef63cb3fb44b071581fd Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 11 May 2022 15:57:36 +0100 Subject: [PATCH] trivial: Automatically set the socket address on Windows --- libfwupd/fwupd-client.c | 4 ++++ src/fu-main.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libfwupd/fwupd-client.c b/libfwupd/fwupd-client.c index a7b7feb9e..0a8f2ef05 100644 --- a/libfwupd/fwupd-client.c +++ b/libfwupd/fwupd-client.c @@ -826,6 +826,10 @@ fwupd_client_connect_async(FwupdClient *self, } else { socket_address = g_strdup(socket_filename); } + } else { +#ifdef _WIN32 + socket_address = g_strdup("tcp:host=localhost,port=1341"); +#endif } /* use peer-to-peer only if the env variable is set */ diff --git a/src/fu-main.c b/src/fu-main.c index 4b479b586..654049c36 100644 --- a/src/fu-main.c +++ b/src/fu-main.c @@ -2381,6 +2381,10 @@ main(int argc, char *argv[]) } else { socket_address = g_strdup(socket_filename); } + } else { +#ifdef _WIN32 + socket_address = g_strdup("tcp:host=localhost,port=1341"); +#endif } /* own the object */